Closing a form from another form

K

kronecker

Sounds simple enough when I do

Form2.Hide() calling this from Form1 it closes fine (or hides)

However, I have a form which is called from another form say Form3
which is called from Form2 and it won't close or hide.

I do

Form3.Close()

and nothing happens - no error message either.

Each form is defined at the top as dim formx as new formx()
where x is the number of the form.


K.
 
A

Armin Zingler

Sounds simple enough when I do

Form2.Hide() calling this from Form1 it closes fine (or hides)

However, I have a form which is called from another form say Form3
which is called from Form2 and it won't close or hide.

I do

Form3.Close()

and nothing happens - no error message either.

Each form is defined at the top as dim formx as new formx() where x
is the number of the form.

If you create several instances of a Form, they are not the same.

http://msdn.microsoft.com/en-us/library/x84ydca5.aspx
http://msdn.microsoft.com/en-us/library/b86b82w0.aspx
http://msdn.microsoft.com/en-us/library/tyd4tfw8.aspx



Armin
 

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