Why application. Exit () cannot really exit the program

Source: Internet
Author: User

Application. Exit () only sends the termination message and does not exit immediately.
Environment. Exit (0)

The application class can be used to start and stop applications and threads and process Windows messages. Call run to start the application message loop on the current thread, and you can choose to make a form visible. Call exit or exitthread to stop the message loop. When your program is in a loop, doevents is called to process messages. Call addmessagefilter to add a message filter to the application message pump to monitor Windows messages. Imessagefilter enables you to block an event or perform special operations before calling an event processing program.

This class has the currentculture and currentinputlanguage attributes used to obtain or set the Regional Information of the current thread.

You cannot create instances of this type.

Addmessagefilter adds a message filter to monitor Windows messages sent to the target.
Doevents processes all Windows messages in the current message queue.
Exit notifies all message pumps that they must be terminated and closes all application windows after the message is processed.
Exitthread exits the message loop on the current thread and closes all windows on the thread.
Olerequired initializes the OLE on the current thread.
Onthreadexception triggers a threadexception event.
Removemessagefilter removes a message filter from the application's message pump.
Run is overloaded. Start running the standard application message loop on the current thread.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.