MaxButton Property

Applies To   See Also

Specifies whether a form has a Maximize button. Available at design time and run time.

Syntax

Object.MaxButton[ = lExpr]

Settings

lExpr

The settings for the MaxButton property are:

Setting Description
True (.T.) (Default) The form has a Maximize button.
False (.F.) The form doesn't have a Maximize button.

Remarks

A Maximize button enables a user to enlarge a form to full-screen size.

A Maximize button automatically becomes a Restore button when a window is maximized. Minimizing, or restoring, a window automatically changes the Restore button back to a Maximize button.

The settings you specify for MaxButton, MinButton, BorderStyle, and ControlBox are not reflected in the form's appearance until run time.

Maximizing a form at run time triggers the Resize event.

Note   The WindowState property reflects the current state of the window. If you set the WindowState property to 2 (Maximized), the form is maximized independently of whatever settings are in effect for the MaxButton and BorderStyle properties.