How to show a new form.

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.
 
K

Ken Tucker [MVP]

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
 
H

Herfried K. Wagner [MVP]

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()
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top