tabs on a form

donjt81

Member
Joined
Jan 30, 2006
Messages
9
Programming Experience
Beginner
I have 4 tabs on a form. for convenience lets call them
tab1
tab2
tab3
tab4

I want a piece of code to run everytime the user clicks on tab1. So lets say the user goes to tab3 does something and click back on tab1, I want this piece of code to be executed. Does anyone know what I should do.

I tried tab1_GotFocus already but that doesnt seem to do it.

Thanks in advance
 
The TabControl SelectedIndexChanged event will get you there, check to see if SelectedIndex = 0 (zero-based) if it's the first TabPage - or check SelectedTab if you got reference to that tab1.
 
Back
Top