Button Control on Tab Page

mike86

Member
Joined
Aug 12, 2007
Messages
11
Programming Experience
3-5
Dear all,

I'm currently using VB.net 2003. I have a window application form which includes tab control with 2 tabs and a button aside.

I want it work in such a way that when a user clicks the button, the tab page would jump from the 1st tab page to 2nd tab page. How do this work?
 
To select a specific tab you set the TabControl's SelectedTab or SelectedIndex property. If you want to do it when a Button is pressed then you need to place the code in the Button's Click event handler.
 
You may use either TabControl.SelectedIndex property or TabControl.SelectedTab property to change the tab page.

for eg,
VB.NET:
TabControl1.SelectedIndex = 1
or
VB.NET:
TabControl1.SelectedTab = TabPage1
 
Back
Top