System.Windows.Forms.Control.ClientSize Property

Gets or sets the height and width of the client area of the control.

Syntax

[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)]
public System.Drawing.Size ClientSize { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

The client area of a control is the bounds of the control, minus the nonclient elements such as scroll bars, borders, title bars, and menus. The Control.SetClientSizeCore(int, int) method is called to set the Control.ClientSize property. The Control.ClientSize property is not always changed through its set method so you should override the Control.SetClientSizeCore(int, int) method to ensure that your code is executed when the Control.ClientSize property is set.

The System.Drawing.Size.Width and System.Drawing.Size.Height properties represent the width and height of the client area of the control. You can use this property to obtain the size of the client area of the control for tasks such as drawing on the surface of the control.

For more information about drawing on controls, see Rendering a Windows Forms Control.

Note:

You cannot bind application settings to this property. For more information on application settings, see Application Settings Overview.

Requirements

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