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.