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

# TMouse.Capture

Handle for the control with mouse capture.

## Declaration

Source position: controls.pp line 2673

`public property TMouse.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.

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