|
-
Jul 11th, 2004, 08:48 AM
#1
Thread Starter
Hyperactive Member
Closing Application ..
What is the best way to close your application in VB.NET. I have an mdi application with 10 child forms. My application starts with my MDI form. When user hits the Exit menu option, I just call End. Is it okay or is there a better way ?
-
Jul 11th, 2004, 09:00 AM
#2
Sleep mode
Use Application.Exit() method :
From MS Help File :
Informs all message pumps that they must terminate, and then closes all application windows after the messages have been processed
This method stops all running message loops on all threads and closes all windows of the application. This method does not force the application to exit. The Exit method is typically called from within a message loop, and forces Run to return. To exit a message loop for the current thread only, call ExitThread.
-
Jul 11th, 2004, 09:11 AM
#3
Fanatic Member
Yup, use Application.Exit as Pirate said. I think End abruptly stops all executing threads, which is not recommended.
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
|