I just started on
VB.Net for a weeks now, and I recently have been encountering a problem with closing form1 when I try to switch over to form2 on my window application. I want to close form1 complettely when form2 comes up. How do I go about doing this.
This is the code that I have:
I instantiate an instance of the form2 with form1 by doing this on form1 btnEnter_Click Handler.
Dim myform As Form2
myform = New Form2()
'I have a textbox with which I have a pass word validation...
Dim n As String
Try
txtValue.Text
Catch
End Try
If n = "123" Then
myForm.Show()
Else
MessageBox.Show("invalid Password","")
End If
When I Cancel out Form1, Form2 wound Disappear also...
A Beginner needs your help!
Thank You very Much