action when particular tab is selected

johncassell

Well-known member
Joined
Jun 10, 2007
Messages
120
Location
Redcar, England
Programming Experience
Beginner
Hi all,

can someone tell me how to code an action for when I click one of the tabs on my tabcontrol.

So far I have only managed to get an action when I click on every tab not a specific one.

here is my code which works for all tabs.

VB.NET:
Private Sub TabControl1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles TabControl1.Click
        MsgBox("You have clicked tab number 1")
    End Sub

Thanks

John
 
Set up the SelectedIndexChanged event, there use SelectedIndex or SelectedTab.
 
Back
Top