How can I execute some piece of code when I change the tab of one 'Tab Control' ?
Printable View
How can I execute some piece of code when I change the tab of one 'Tab Control' ?
Handle TabControl SelectedIndexChanged event.
VB.Net Code:
Private Sub TabControl1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TabControl1.SelectedIndexChanged 'Your code End Sub
(TabControl1 the name of the TabControl)
vb Code:
Dim page As String = DirectCast(sender, TabControl).SelectedTab.ToString
thank you =D