WindowsFormsApplicationBase.MainForm 屬性

定義

取得或設定此申請的主要表單。

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

屬性值

此申請的主要表格。

備註

使用 MainForm 屬性來取得或設定 Visual Basic 應用程式啟動/關機模型所使用的 Form 物件作為應用程式的主要表單。

此特性支援 Visual Basic 應用程式啟動/關閉模式。 欲了解更多資訊,請參閱 Visual Basic 應用模型概述

當應用程式關閉時,對此屬性的變更不會持續存在。 要永久更改主形態,必須在 Project Designer 中更改設定。

適用於

另請參閱