Reference: http://msdn.microsoft.com/zh-cn/library/aa497275.aspx
Application. Exit is a forced exit method, just like Win32 postquitmessage (). It means to discard all message pumps, expand the call stack, and return the execution to the system.
Disable applications in Windows (Win32 or. NET)ProgramThe correct way is to close its main application window (such as form. Close ). You must manually close any windows that still exist after the master message pump ends. Calling form. Close or form. dispose to close a window before exiting the application is a good practice to clear the window, but you need to do this consciously. We need to remember that the onclosing () of the. NET Framework is wm_close of the Win32 managed version, rather than wm_destroy.
In addition, if you use form. Close (), you can clear the content and close the file of your application by handling the onclosing or onclosed events. If you use application. Exit to forcibly exit the application, these events cannot be called.
Good luck!
--------------------------------------------------
Lee Sen-Listen E-mail: lisencool@gmail.com |
Statement: Here we focus onWinCEAndWindows MobileSome basic knowledge in development. I would like to share with you, and I hope you will give your comments and contribute to me. I will post your name for you as soon as possible! Announce: Here collects general knowledge on WinCE and Windows Mobile. i'm very gglad to share them with all friends, and also hope you can share your problems and opinions and contribute articles to me to share with others. i'll publish your articles and sign your name at the first time. |