Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Occurs when the application is about to shut down.
Occurs when the application is about to enter a modal state.
Occurs when the application finishes processing and is about to enter the idle state.
Occurs when the application is about to leave a modal state.
Occurs when an untrapped thread exception is thrown.
Occurs when a thread is about to shut down. When the main thread for an application is about to be shut down, this event is raised first, followed by an ApplicationExit event.