Question about Application Layout

  • Thread starter Thread starter TC
  • Start date Start date
T

TC

I'm building an application which will display several documents at
once. I'd like my application to behave the way many applications,
including Microsoft Word, behave -- I want each document to be
displayed in a separate window, and I want to be able to open and
close windows at will.

As simple as this behavior sounds, I can't figure out how to program
it in VB.NET. I can open several documents in separate windows, but
when I close the first window, all others close automatically. Can
anyone provide me with advice on how to get it working right?


-TC
 
I'm building an application which will display several documents at
once. I'd like my application to behave the way many applications,
including Microsoft Word, behave -- I want each document to be
displayed in a separate window, and I want to be able to open and
close windows at will.

As simple as this behavior sounds, I can't figure out how to program
it in VB.NET. I can open several documents in separate windows, but
when I close the first window, all others close automatically. Can
anyone provide me with advice on how to get it working right?

-TC

I figured it out!

In the project properties, there is an option called "Shutdown mode".
By default, it is set to "When startup form closes", but it can be
changed to "When last form closes". After changing that, I can get the
behavior I want.

-TC
 
You might also want to consider using a MDI form as the parent (start up
form). That way all your documents are contained, and you can close them all
from the parent.
 
Back
Top