switching forms using tab control

chiba_11

Member
Joined
Oct 8, 2008
Messages
5
Programming Experience
Beginner
hi, everyone. i'm just new here and in using vb.net. i just want to know how to switch forms using the tab control. hope someone will help. tnx.:)
 
thanks for replying.:D nope. just an ordinary form. here's what I've done. i created 4 forms when i click one of the tab pages i want it to go to the other forms.
 
'Assuming the 4 forms are already shown within your mdiParent

Private Sub TabControl1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TabControl1.SelectedIndexChanged
Select Case TabControl1.SelectedIndex
Case 0
Form1.Activate()
Case 1
Form2.Activate()
Case 2
Form3.Activate()
Case 3
Form4.Activate()
End Select
End Sub

Note: Try to determine your requirements carefully before starting your project. A TabControl might be sufficient enough to do what needs to be done.
 
Back
Top