[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Snaps the specified form to the nearest snap target.
Source position: forms.pp line 448
public function TWindowMagnetManager.SnapForm( |
Form: TCustomForm; |
var WindowPos: TWindowPos |
):Boolean; |
Form |
|
Form instance examined and updated in the method. |
WindowPos |
|
Structure with the window handle and position examined and updated in the method. |
Returns True if the specified form was repositioned (or resized) due to snapping behavior for the form or application.
No actions are performed in the method when the Enabled property is set to False, when the window flags indicate that the window is being shown or hidden, or at design-time.
SnapForm calls the GetCompositorExtendedBorder routine to determine if the size for the window is inaccurate for borders or shadows added by the compositor for the desktop window manager. Both the SnapToMonitor and SnapToForms methods are called to determine the return value for the method.
The return value is True if the window position was snapped to either an edge on the monitor or another form instance in the application.
SnapForm is called from the WMWindowPosChanging method when a LM_WINDOWPOSCHANGING message is received and handled for a form instance.
Remark: | In the current LCL release, the LM_WINDOWPOSCHANGING message is dispatched for the Windows platform only. None of the other widgetsets checked for or apply the message. |
|
Enables or disables form and/or screen snapping behavior using the manager class. |
|
|
Snaps a window to an edge on the monitor. |
|
|
Snaps a form to an edge on another form in the application which is a valid snap target. |
Version 4.0 | Generated 2025-05-03 | Home |