-
Closing of Forms.
My problem is this:
When a new form(say Form2) pops up on clicking a button on the previous form(say Form1), I need to get the Form1 closed automatically.
I found the close method but it closes all the forms.Also there is Hide mehtod , but i dont know how to use that. Will this Hide help in solving the problem?
Pls let me know
-
if form2 is called in form1 then closing form1 closes all subsequent forms.
http://www.devcity.net/net/article.a...=multipleforms
that link should help you.
-
i guess the simplest way is to use the hide and show methods, somthing like this
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim newform As New Form2()
Me.Hide()
newform.ShowDialog()
Me.Close()
End Sub