I have created to GUI interfaces using netbeans drag n drop. The first interface has a button upon clicking which opens the second interface. I want to close the 1st interface as soon as I click the button in it so that only the second interface is displayed.
How can I do that?
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...