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

TMouse.CursorPos

The screen position for the mouse cursor.

Declaration

Source position: controls.pp line 2684

public property TMouse.CursorPos : TPoint
  read GetCursorPos
  write SetCursorPos;

Description

CursorPos is a TPoint property which contains the screen coordinates where the mouse pointer is located. The X and Y members in the TPoint type contain the horizontal and vertical screen coordinates, respectively, and are read from and written to the widgetset class instance.

When reading values in the property, the X and Y members may return 0 if the widgetset is unable to return a TPoint instance.

Remark: For the macOS Carbon widgetset, changing the values in CursorPos does not triggering OnMoveMove events in a form or control.

Version 3.2 Generated 2024-02-25 Home