Form.ControlBox プロパティ
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

/** @property */ public boolean get_ControlBox () /** @property */ public void set_ControlBox (boolean value)
フォームの左上隅にコントロール ボックスを表示する場合は true。それ以外の場合は false。既定値は true です。

ControlBox プロパティが true に設定された場合は、キャプション バーの左上隅にコントロール ボックスが表示されます。コントロール ボックスをクリックすると、システム メニューにアクセスできます。
![]() |
---|
作成時に最大表示されるマルチ ドキュメント インターフェイス (MDI) 子フォームの場合、ControlBox プロパティを false に設定しても影響はありません。 |

ControlBox、FormBorderStyle、MaximizeBox、MinimizeBox、StartPosition の各プロパティを使用して、境界線またはキャプション ボックスのないフォームを作成する例を次に示します。この例で作成したフォームを使用して、たとえば、アプリケーションのスプラッシュ スクリーンを作成できます。この例では、メソッドがフォーム クラスで定義されており、フォームの初期化中に呼び出されることを前提にしています。
Public Sub CreateMyBorderlesWindow() FormBorderStyle = FormBorderStyle.None MaximizeBox = False MinimizeBox = False StartPosition = FormStartPosition.CenterScreen ' Remove the control box so the form will only display client area. ControlBox = False End Sub 'CreateMyBorderlesWindow
public void CreateMyBorderlessWindow() { this.FormBorderStyle = FormBorderStyle.None; this.MaximizeBox = false; this.MinimizeBox = false; this.StartPosition = FormStartPosition.CenterScreen; // Remove the control box so the form will only display client area. this.ControlBox = false; }
public: void CreateMyBorderlessWindow() { this->FormBorderStyle = ::FormBorderStyle::None; this->MaximizeBox = false; this->MinimizeBox = false; this->StartPosition = FormStartPosition::CenterScreen; // Remove the control box so the form will only display client area. this->ControlBox = false; }
public void CreateMyBorderlessWindow() { this.set_FormBorderStyle(get_FormBorderStyle().None); this.set_MaximizeBox(false); this.set_MinimizeBox(false); this.set_StartPosition(FormStartPosition.CenterScreen); // Remove the control box so the form will only display client area. this.set_ControlBox(false); } //CreateMyBorderlessWindow

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からForm.ControlBox プロパティを検索する場合は、下記のリンクをクリックしてください。

- Form.ControlBox プロパティのページへのリンク