ClientWidth Property

Applies to:  Window object
See also:  ClientHeight property, WindowHeight property, WindowWidth property

read-only

Returns the height (in pixels) of a window's client area.

Syntax:

object.ClientWidth

The ClientWidth syntax has these parts:

Part Description
object The name of a Window object.

Remarks:

For top-level windows, and Mdi Child windows, the client area is the main workspace of a window excluding the title bar and border.  For most other windows, the client area is the whole window.

The ClientWidth property cannot be changed directly.  To change the size of the client area, change the size of the whole window using WindowWidth and WindowHeight.

To make the client area a specific width, subtract the width of the client area from the width of the window to get the total width of the non-client area (2 times the border width).  Then set the width of the window to that value plus the desired client width.

 

Home Copyright and Disclaimer