[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Moves the form to the location specified in the Position property.
Source position: forms.pp line 669
protected procedure TCustomForm.MoveToDefaultPosition; virtual; |
MoveToDefaultPosition is a method used to move a form instance to the location specified in its Position property. It ensures that the form appears on the correct monitor for the values in the DefaultMonitor and Position properties.
DefaultMonitor is used to determine whether the form needs to be moved to a different monitor for the value in Position. For instance:
Position specifies an associated form and the relative position for the relocated form instance. For instance:
MoveToDefaultPosition gets the display rectangle for the form instance, and translates the form coordinates to the correct Monitor. SetBounds is called to apply the translated origin using the height and width for 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.
The implementation for the method was changed in LCL version 2.3.0.
|
The initial placement for the form. |
|
|
The monitor on which the form is displayed. |
Version 3.2 | Generated 2024-02-25 | Home |