NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Form.ControlBox

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);

Property Value

true if the form displays a control box in the upper left corner of the form; otherwise false. The default is true.

Remarks

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.

Example [C#]

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()
{

}

See Also

Form Class | Form Members | System.WinForms Namespace | MaximizeBox | MinimizeBox