Newbie asking Keep An Application Alive while closing windows.

  • Thread starter Thread starter Jeffrey Bradshaw
  • Start date Start date
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 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.
 
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.
 
Back
Top