Event fired after the user resizes a form.

Parameters

<nType>

A number that indicates how the user resized the form. It has three possible values:

Value

Description

0

The user resized the form with the mouse or restored the form from a maximized or minimized condition.

1

The user minimized the form.

2

The user maximized the form.

<width>

The new width of the client area of the form.

<height>

The new height of the client area of the form.

Property of

Form, SubForm

Description

Use onSize to perform actions when the user resizes a form.

The two parameters passed to the event handler indicate the new size of the client area of the form, the area below the title bar and inside the edges of the form. To get the new size of the entire form, check the form’s width and height properties directly.

Some controls have an onFormSize event that fires when the form is resized; any actions specific to those controls should be handled with that event. Other controls have an anchor property, and are resized to automatically.