A
anthony
Hi,
I have a button (Button1) to open the main form. If I want to have another
button to close this opened form, how do I do it without making Mainform a
global variable?
Thanks!
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim MainFrom As New frmMain
MainFrom.Show()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
' Close the form opened by Button1
End Sub
I have a button (Button1) to open the main form. If I want to have another
button to close this opened form, how do I do it without making Mainform a
global variable?
Thanks!
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim MainFrom As New frmMain
MainFrom.Show()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
' Close the form opened by Button1
End Sub