'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.
|