Sign in Join
FPDoc Onlineexperiment

TCustomForm.WMWindowPosChanging procedure

Member of TCustomFormprotectedIn unit Forms

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

Declaration

pascal
procedure 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.

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.

Added in LCL version 3.0.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.