System.Windows.Forms.Form.ControlBox Property

Gets or sets a value indicating whether a control box is displayed in the caption bar of the form.

Syntax

[System.ComponentModel.DefaultValue(true)]
public bool ControlBox { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

If the Form.ControlBox property is set to true, the control box is displayed in the upper-left corner of the caption bar. The control box is where the user can click to access the system menu.

If you set Form.ControlBox to false, and also set the Form.Location property, the Form.Size property of Form will not update to reflect that the non-client area of the form has been hidden. To fix this problem, put the code which alters the Form.Location property to the Control.HandleCreated event.

Note:

When set to false, the Form.ControlBox property has no effect on a Multiple-document interface (MDI) child form that is displayed maximized at time of creation.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0