|
-
Mar 18th, 2007, 12:27 AM
#1
Thread Starter
Lively Member
[2005] closing application
I have 2 forms in the application. The first form lets user select what information the second form will display.
When the user close the second form, is the first form also closed? I noticed that the process is still in the task manager. Is there a way to completely close the application?
-
Mar 18th, 2007, 03:01 AM
#2
Re: [2005] closing application
There are two options in the project properties. You can either quit the app after closing the first form or after closing all forms. With the first option the app will exit if and only if you close the first form. That means that you must keep the first form open until you want to exit the app. With the second option the app will exit if and only if there are no more forms open. This is good for a dialogue-based application like a wizard because you can close the first form when you show the next without exiting the app.
Depending on which option you choose you can call the Close method of either the first or the last form to exit the app. Regardless of which option you choose you can call Application.Exit at any time and from anywhere.
Now, having said all that, it sounds like your design is flawed. It sounds like you're hiding the first form then closing the second, so you can't see any forms but the first is still open so the app won't exit. In that case you should be choosing the second option and closing the first form instead of hiding it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|