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

TCustomForm.WMWindowPosChanging

Notifies the magnetic window manager when the position for a form is being updated.

Declaration

Source position: forms.pp line 621

protected procedure TCustomForm.WMWindowPosChanging(

  var Message: TLMWindowPosChanging

); message;

Description

WMWindowPosChanging is a method used to notify the MagnetManager in TScreen when the position for the window in Message is being updated. The SnapForm method in the TWindowMagnetManager instance is called to update the Form instance with the window position in Message. The SnapForm method may update the window position if it is within the distance where snapping behavior is engaged for the form.

Use the SnapOptions property to specify which snapping behaviors are enabled for the form, and the distance at which the snapping behavior is engaged. You can also use the SnapBuffer and ScreenSnap properties to maintain Delphi VCL code compatibility.

Remark: In the current LCL release, the LM_WINDOWPOSCHANGING message is dispatched for the Windows platform only. None of the other widgetsets check for or apply the message.

Version info

Added in LCL version 3.0.

See also

TCustomForm.SnapOptions

  

Contains the form and screen snapping options for the form instance.

TCustomForm.SnapBuffer

  

Distance from (or proximity to) an edge on a snap target where the snapping behavior is automatically engaged.

TCustomForm.ScreenSnap

  

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

TWindowMagnetManager.SnapForm

  

Snaps the specified form to the nearest snap target.

TScreen.MagnetManager

  

Manages screen / form snapping behavior for the screen.

Screen

  

The TScreen singleton for the application.


Version 3.2 Generated 2024-02-25 Home