Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27210

[RESOLVED] [VB2012] How to call a control from another form.

$
0
0
Hi guys,

I have a combobox in one form and a tabcontrol in another form , how can I show for ex. the tabpage1 in the tabcontrol when I click on iten 1 with the combo. and and the tabpage2 in the tabcontrol when I click on item 2 with the combo , and so on.

this is the code I use for my combobox in the first form:

Code:

    If ComboBox2.SelectedItem IsNot Nothing Then
            Dim ans1 As Double
            ans1 = ComboBox2.SelectedIndex
            Select Case ans1
                Case -1
                    MessageBox.Show("צורת הגג")
                Case 0
                    Label19.Text = ComboBox2.SelectedItem

                Case 1
                    Label19.Text = ComboBox2.SelectedItem

                Case 2
                    Label19.Text = ComboBox2.SelectedItem

                Case 3
                    Label19.Text = ComboBox2.SelectedItem

            End Select
        End If
    End Sub



thanks.

Viewing all articles
Browse latest Browse all 27210

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>