How to show a new form.

  • Thread starter Thread starter bokiteam
  • Start date Start date
B

bokiteam

Hi All,

In VB6, I can show/hide form by visable.show.

It didn't work on VB.net, could you please advice,

I have a form2, I want to show it after click button 1 in form1.

Thank you very much!

Best regards,
Boki.
 
Hi,

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
' in vb 2005 this will work Form2.Show()
Dim frm As New Form2
frm.Show()
End Sub

Ken
 
In VB6, I can show/hide form by visable.show.

It didn't work on VB.net, could you please advice,

I have a form2, I want to show it after click button 1 in form1.

\\\
Dim f As New Form1()
f.Show()
///

and/or in .NET 2.0:

\\\
My.Forms.Form1.Show()
///
 
Back
Top