Newbie asking Keep An Application Alive while closing windows.

J

Jeffrey Bradshaw

I have an app that opens to a login screen. Once the user have been
verified, that window opens another window. If I close the login window, the
whole app closes down so I end up hiding it currently. When my main window
closes, it closes the login window at the same time.

Is there an easier way to do this so that I can actually close the login
window after I've opened the next window? Otherwise, I have to keep track of
a window and when the final window closes, close that login window.

TIA.

Jeffrey.
 
A

AlexB

A reference to the window you don't want to close from the
should keep it from being disposed. Just watch out for
circular references, i.e. A refs B and B refs A, which
will cause the app to never unload.

Good luck.
 
J

Jeffrey Bradshaw

I think you misunderstood the question. Let's try again:

When you have an application that has multiple windows, it seems like the
first window has to stay open all the time otherwise the application will
close. So if I have Window A opens window b. B would close A and opens C, C
closes B and opens D, .... But as soon as B closes A, the app closes. Is
there any way to keep the app alive without having to leave window A open
for the duration of the program?

TIA - Jeffrey.
 

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