共用方式為


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 屬性。

適用於

另請參閱