FormClosingEventArgs(CloseReason, Boolean) 构造函数

定义

初始化 FormClosingEventArgs 类的新实例。

public:
 FormClosingEventArgs(System::Windows::Forms::CloseReason closeReason, bool cancel);
public FormClosingEventArgs (System.Windows.Forms.CloseReason closeReason, bool cancel);
new System.Windows.Forms.FormClosingEventArgs : System.Windows.Forms.CloseReason * bool -> System.Windows.Forms.FormClosingEventArgs
Public Sub New (closeReason As CloseReason, cancel As Boolean)

参数

closeReason
CloseReason

一个 CloseReason 值,表示关闭窗体的原因。

cancel
Boolean

如果为 true,则取消事件;否则为 false

注解

closeReasoncancel 参数分别用于初始化 CloseReasonCancel 属性。

适用于

另请参阅