System.MouseX

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Read-Only Property (As Integer )
IntegerValue = aSystem.MouseX

Supported for all project types and targets.

The X coordinate of the mouse (points). Measured from the top-left corner of the screen.

Notes

fa-info-circle-32.png
MouseX is supported for Desktop projects only.

Example

This example gives the X and Y coordinates of the mouse when an event fires. For example, it works in a MouseDown or MouseEnter control event handler.

MessageBox("X=" + System.MouseX.ToString + " Y=" + System.MouseY.ToString)