Instance Forms

A

Ana Rita

I'm starting with vb.net, and i already come across with
some problens.
i have three forms.

The start form is form1.vb, and it have two buttons.
Button1 shows Form2.vb, and button2 shows Form3.vb.

I've place the instance of the two forms into the main
body of the form (i.e. outside any Subs, Events or
Methods):
Dim F2 as new Form2
Dim F3 as new Form3
If i do this and try to run the project the main form
doesn't appear.
If i only instance a form, the main form appear when i
run the project.

Theres any one who can help me.

Thank you all.

Ana Rita
 
H

Herfried K. Wagner [MVP]

* "Ana Rita said:
I'm starting with vb.net, and i already come across with
some problens.
i have three forms.

The start form is form1.vb, and it have two buttons.
Button1 shows Form2.vb, and button2 shows Form3.vb.

I've place the instance of the two forms into the main
body of the form (i.e. outside any Subs, Events or
Methods):
Dim F2 as new Form2
Dim F3 as new Form3
If i do this and try to run the project the main form
doesn't appear.
If i only instance a form, the main form appear when i
run the project.

Theres any one who can help me.

The code should work. Please post more code.
 
A

Ana Rita

There is no more code.
try to open a project and add three forms to it.
than set the startup form. In the startup form instance
the other two forms and try to run the project. The
stautup form isn't shown. If you instance only one the
startup form appear.

Code:

Public Class Form1
Inherits System.Windows.Forms.Form
Dim F2 As New Form2
Dim F3 As New Form3
page_load(.....)
end sub
end class
 

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