Closing one form when another opens

  • Thread starter Thread starter Brad Allison
  • Start date Start date
B

Brad Allison

Is there an easy way to close one form when another opens?

Thanks for the information.

Brad
 
Certainly.

In the Closing event for the form, you can instantiate another form object
and call it's Show method.

You will run into problems if the form you are closing is the main form of
that application. If this is the case, you will have to catch the closing
event as well and cancel the application exit.
 
If you have many instances where forms need to interact in some type of a
relation I would sugest you use a UI managment controler and make it
responsable to manage when forms open or close.
 

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