TWindowMagnetManager.SnapToMonitor function
Snaps a window to an edge on the monitor.
Declaration
function SnapToMonitor(Opts: TWindowMagnetOptions;
var WindowPos: TWindowPos): BooleanArguments
Opts | Snapping options used in the method. |
WindowPos | Structure with the window handle, position, and flags for the form affected in the method. The variable parameter can be updated in the method. |
Function result
Returns True if the form was successfully snapped to a monitor edge in the method. Returns False if SnapToMonitor is not enabled in the Opts parameter.
Description
SnapToMonitor converts the window position information in WindowPos
to a TRect instance used to locate the monitor and position on its work area.
The SnapToSides method is called to adjust the window position when snapping
behavior is applied for the window.
The return value is True if the window was successfully snapped to an edge on a monitor, and value(s) in WindowPos were changed.
No actions are performed in the method if SnapToMonitor is not enabled in the Opts argument. In this case, the return value is False.
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
