[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Forms' (#lcl)

TCustomForm.MoveToDefaultPosition

Moves the form to the location specified in the Position property.

Declaration

Source position: forms.pp line 595

protected procedure TCustomForm.MoveToDefaultPosition; virtual;

Description

MoveToDefaultPosition is a method used to move the form instance to the location specified in its Position property. Position indicates the size and relative position for the form instance. See TCustomForm.Position and TPosition for information about the property values and their meanings.

MoveToDefaultPosition gets the display rectangle for the form instance. Its dimensions and coordinates are translated to the Monitor and/or relative layout indicated in Position. SetBounds is called to apply the translated origin, height and width to the form instance.

No actions are performed in the method when either Parent or the ParentWindow handle has been assigned for the form instance. No actions are performed in the method when WindowState contains wsFullScreen or wsMaximized.

MoveToDefaultPosition is called from the AllAutoSized, SetRestoredBounds, and UpdateShowing methods. It is also called when a new value is assigned to the Position property.

See also

TCustomForm.Position

  

The initial placement for the form.