Equinox Online Help - Language Reference - A to Z
MousePosition |
|
---|---|
Applies to | |
Syntax | MousePosition [XItem][, YItem][, WidthItem][, HeightItem][, ObjectExpression] |
Action | [Statement] Returns the current coordinates (in screen pixels) of the mouse cursor. |
Scope | Only usable in form methods. |
Notes | This statement determines the current screen coordinates (in pixels) of the mouse cursor. XItem and YItem are the names of two fields, variables, or workareas, into which the coordinates are returned. You can use the optional argument, ObjectExpression, to specify the object name of an object on the form. The statement then returns the position of the cursor within that object. The size of the object (in pixels) is returned in WidthItem and HeightItem. If the cursor is not within the specified object then the coordinates -1, -1 are returned. If an error occurs, an error number is stored in the system workarea SysError. |
Category | Menus and mouse |
See Also | EnableCommand, MouseObject, MouseObjectName, Trigger |
Example | The following example divides a picture into sixteen parts. Text is displayed on the status line, describing the cell currently containing the mouse cursor. number x(4, 0), y(4, 0), PicHeight, PicWidth |