System.Windows.Forms
2.0.0.0
System.Enum
The and events are raised when a is closed, either through user action or programmatically. Handlers for these events receive parameters of type and , respectively. Both of these event argument classes use the enumeration.
Specifies the reason that a form was closed.
Field
System.Windows.Forms.CloseReason
The method of the class was invoked.
2.0.0.0
Field
System.Windows.Forms.CloseReason
The owner form is closing.
2.0.0.0
Field
System.Windows.Forms.CloseReason
The parent form of this multiple document interface (MDI) form is closing.
2.0.0.0
Field
System.Windows.Forms.CloseReason
The cause of the closure was not defined or could not be determined.
2.0.0.0
Field
System.Windows.Forms.CloseReason
The Microsoft Windows Task Manager is closing the application.
2.0.0.0
Field
System.Windows.Forms.CloseReason
The user is closing the form through the user interface (UI), for example by clicking the Close button on the form window, selecting Close from the window's control menu, or pressing ALT+F4.
2.0.0.0
Field
System.Windows.Forms.CloseReason
The operating system is closing all applications before shutting down.
2.0.0.0