How can I know the selected tab in a TabControl?

DevilAkuma

Active member
Joined
Oct 24, 2005
Messages
37
Programming Experience
Beginner
Hello!

I'm sure, that this is a easy question, but I don't know the way to get the selected tab.

I've hade a function that handles TabControl1.SelectedIndexChanged... When I select a tab in my form, this function takes the control, but I don't know where can i get the index.

Ant idea?

Thanks in advance.
 
tabcontrol1.SelectedIndex

If you are using the SelectedIndexChanged event to handle multiple TabControls it's better using Sender.SelectedIndex, because the 'Sender' is the control from where the event was initiated.
 
Back
Top