maxButton

Type: Boolean

Availability: Read or write at any time

The maxButton property specifies whether a form has a Maximize button.

The settings of the Form class maxButton property are listed in the following table.

Value Description
true The form has a Maximize button (the default).
false The form does not have a Maximize button.

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

Setting the value of the maxButton property to true causes a form with the borderStyle property set to BorderStyle_None (0) to adopt a borderStyle value of BorderStyle_Single (1).

The form also displays a caption area, regardless of whether the form caption is empty. This property should not be changed when an MDI child form is maximized.

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.

Maximizing a form at run time generates a resize event. The windowState property reflects the current state of the window. If you set the windowState property to WindowState_Maximized (2), the form is maximized independently of whatever settings are in effect for the maxButton and borderStyle properties.