Question unload and load form vs 2005

newdbo

Active member
Joined
Aug 23, 2009
Messages
25
Programming Experience
Beginner
HI all, i have a really newbie question to load and unload form just like vb6 in vs 2005 using vb.net. I'm trying this code.
VB.NET:
    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Me.Close()
        Form2.Show()


    End Sub
but when i click the button, nothing happened...Please give me an advise. Any help appreciated.
Thanks in advance
 
I think you are running this code in the startup form. If startup form closes, the entire application closes. Try this on a form which is not startup.

Thanks
Panna
 
Back
Top