Question Hide/Show the Selected Tabpage using Menu

Joined
Jan 6, 2012
Messages
5
Programming Experience
Beginner
TabControl.png
The Problems is What if the user Accidentally Click in the Adult Patient Information Record then I want to Click the Minor Patient Information Record but the Problem is that when i Clicked the Minor Patient Information Record in the Menu Script the Tabpage for the Minor Patient Information Record is gone can you help me?
This is the Code:
Private Sub DINS_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
TabControl1.Hide()
End Sub




Private Sub AdultPatientInformationRecordToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AdultPatientInformationRecordToolStripMenuItem.Click


If AdultPatientInformationRecordToolStripMenuItem.Pressed Then
TabControl1.Show()
TabControl1.TabPages.Remove(TabPage2)
End If




End Sub


Private Sub MinorPatientInformationRecordToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MinorPatientInformationRecordToolStripMenuItem.Click


If MinorPatientInformationRecordToolStripMenuItem.Pressed Then
TabControl1.Show()
TabControl1.TabPages.Remove(TabPage1)
End If
End Sub
 

Attachments

  • MainMenu.png
    MainMenu.png
    542.9 KB · Views: 41
Back
Top