close form

SpiN9823
01-20-2004, 10:10 AM
does any1 no how to make a form close when i click a buttton but also make a form open?
i used this code but it didnt work

Private Sub Button1_Click(byval stuff) Handles Button1.Click
Me.Close
Dim frm as new form1
frm.show()
end sub

any help?

Iceplug
01-20-2004, 12:36 PM
Does it work if you move
Me.Close()
after the
frm.Show()
?

If not, what happens when you press the button?

Ian96
01-20-2004, 04:54 PM
It closes everything, i am also struggling with this

SpiN9823
01-20-2004, 05:13 PM
it closes everything

SpiN9823
01-20-2004, 05:56 PM
I FOUND IT OUT!!
Private Sub _Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles .Click
Dim frm As New Form
frm.Show()
Me.Visible = False
End Sub
End Class

THX VLDARKVIRUS

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum