Show new form?

  • Thread starter Thread starter Sven
  • Start date Start date
S

Sven

In VB 6 I could show a new form like this:

Form2.show

how is this possible in VB.NET?

Thanks a lot
 
Try the following:
-----------------

Dim objForm as Form2

objForm = New Form2

objForm.Show

---------------

In VB.net you have to explicitly create an instance of the form class. VB6
did this in the background for you.

HTH,

Trev.
 
Yes 2 ways

Form1.show <---- normal show(click anywhere else on screen, form1 goes in background)
Form1.showdialog<----- lock the screen on form1
 
thanks a lot! sorry for this easy questin I'm new to VB.Net... it's quite
different from VB.NET
 

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

Back
Top