Gets or sets a value indicating whether the form has a control box.
[Visual Basic] Public Property ControlBox As Boolean [C#] public bool ControlBox {get; set;} [C++] public: __property bool get_ControlBox(); public: __property void set_ControlBox(bool); [JScript] public function get ControlBox() : Boolean; public function set ControlBox(Boolean);
true if the form displays a control box in the upper left corner of the form; otherwise false. The default is true.
If the ControlBox property is set to true the control box will be displayed in the upper-left corner of the caption bar. The control box is where the user can click to access the system menu.
Note If your form does not display a control box the form will not be able to close using the Alt+F4 keyboard combination.
The following example uses the ControlBox, BorderStyle, MaximizeBox, MinimizeBox, and StartPosition properties to create a form that does not have any border or caption box. The form created in this example could be used to create a splash screen for an application. The example assumes that a Form has been created named Form1 and that the example's method is called when the form is being initialized.
[C#]
public void CreateMyBorderlesWindow() { }
Form Class | Form Members | System.WinForms Namespace | MaximizeBox | MinimizeBox