ApplicationContext.MainForm 屬性

定義

取得或設定 Form 作為上下文。

public:
 property System::Windows::Forms::Form ^ MainForm { System::Windows::Forms::Form ^ get(); void set(System::Windows::Forms::Form ^ value); };
public System.Windows.Forms.Form MainForm { get; set; }
public System.Windows.Forms.Form? MainForm { get; set; }
member this.MainForm : System.Windows.Forms.Form with get, set
Public Property MainForm As Form

屬性值

用這個 Form 作為背景。

備註

此性質決定了此上下文的主點 Form 。 此性質隨時可能變更。 若 OnMainFormClosed 未被覆寫,執行緒的訊息迴圈在參數閉合時 mainForm 終止。

適用於