Sign in Join
FPDoc Onlineexperiment

TMouse.Capture property

Member of TMousepublicIn unit Controls

Handle for the control with mouse capture.

Declaration

pascal
property Capture: HWND read GetCapture write SetCapture;

Description

Capture is a HWND property which contains the handle for the control which has the mouse capture. Its value is read from the LCL interface (and ultimately the widgetset class instance).

Setting a new value for the property causes either SetCapture or ReleaseCapture to be called in the LCL interface (or widgetset class instance). When set to 0 (the unassigned handle value), ReleaseCapture is called. Otherwise, SetCapture is called to assign the new handle value to the widget.

For the macOS Carbon widgetset, release capture is not supported.

An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.