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

TCustomForm.ScreenSnap

Indicates whether the form instance can be snapped to an edge on the monitor.

Declaration

Source position: forms.pp line 802

public property TCustomForm.ScreenSnap : Boolean
  read GetScreenSnap
  write SetScreenSnap
  stored False;

Description

ScreenSnap is a Boolean property which indicates whether the form instance can be snapped to an edge on the monitor. When enabled, an edge on the form will automatically snap to the nearest screen edge when it is within the distance where the snapping behavior is engaged.

Use SnapBuffer (or the Distance property in SnapOptions) to define the distance from (or proximity to) an edge where the snapping behavior is engaged.

Use the SnapOptions.SnapToForms to enable or disable snapping the form instance to an edge for another form in the application.

Use the SnapOptions.SnapFormTarget property to control whether the form allows other forms to be snapped to its edges.

Remark: Screen snapping depends on the LM_WINDOWPOSCHANGING message dispatched when the position for a form (window) is changed. 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.

Version info

Added in LCL version 3.0.


Version 3.2 Generated 2024-02-25 Home