-
Feb 2nd, 2012, 08:51 AM
#1
Thread Starter
Member
On Tab Control Select
How can I execute some piece of code when I change the tab of one 'Tab Control' ?
-
Feb 2nd, 2012, 09:30 AM
#2
Addicted Member
Re: On Tab Control Select
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)
Last edited by pkarvou; Feb 2nd, 2012 at 09:50 AM.
-
Feb 6th, 2012, 05:23 PM
#3
Thread Starter
Member
Re: On Tab Control Select
Originally Posted by pkarvou
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)
thanks for the reply, how can I execute different lines due to the tab choosed ?
I tried to use CASE 'Name of Tab1' but it changes it to LCASE
-
Feb 6th, 2012, 05:40 PM
#4
Re: On Tab Control Select
vb Code:
Dim page As String = DirectCast(sender, TabControl).SelectedTab.ToString
-
Feb 22nd, 2012, 07:50 PM
#5
Thread Starter
Member
Re: On Tab Control Select
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|