Close one form, Show the other! [resolved... blah]
I know this has to be the world's easiest VB.NET question!
Here's what I want: Show form1. Press the button on Form1, and form2 should show up. Form1 should then close.
Here's what I did
In a module:
VB Code:
Module Module1
Public f1 As New Form1
Public f2 As New Form2
Sub Main()
f1.ShowDialog()
End Sub
End Module
In form1's button:
VB Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
f1.Close()
f2.Show()
End Sub
And that's it!
Now when I click the button, form2 appears briefly and then disappears.
Surely it has to be something simple. What am I missing?