I have a form1 in that their is a button by name "login"
by clicking on the button "login" the form2 will be shown
in a form2 their is username and password text boxes and two button one is "ok" and another one is "cancel"
by clicking on a button "cancel" it should return to the form1
how to link the button "cancel"
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 ...