CursorPosition: IGxPoint;
The CursorPosition property returns the point containing the current screen coordinates of mouse cursor.
It is used only in the desktop application.
Executing the example requires a form and a button named Button1 on the form.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
CurPosition: IGxPoint;
Begin
CurPosition := WinApplication.CursorPosition;
Self.Text := CurPosition.X.ToString + " | " + CurPosition.Y.ToString;
End Sub Button1OnClick;
On clicking the button the console window displays current screen coordinates of the mouse cursor.
See also: