This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v20.6
GET MOUSE

GET MOUSE 


 

GET MOUSE ( mouseX ; mouseY ; mouseButton {; *} )  
Parameter Type   Description
mouseX  Real in Horizontal coordinate of mouse
mouseY  Real in Vertical coordinate of mouse
mouseButton  Longint in Mouse button state: 0 = Button up 1 = Button down 2 = Right button down 3 = Both buttons down
Operator in If specified, global coordinate system is used
If omitted, local coordinate system is used

The GET MOUSE command returns the current state of the mouse.

The horizontal and vertical coordinates are returned in mouseX and mouseY. If you pass the * parameter, the coordinates are expressed relative to the main screen (macOS and Windows SDI mode) or to the application window (Windows MDI mode). If you omit the * parameter, they are expressed relative to the current form window (if any) of the current process.

The parameter mouseButton returns the state of the buttons, as listed previously.

Note: The values 2 and 3 can be returned under Mac OS X starting with version 10.2.5 only.

Example  

See the example for the Pop up menu command.



See also 

Caps lock down
Macintosh command down
Macintosh control down
Macintosh option down
ON EVENT CALL
Shift down
Windows Alt down
Windows Ctrl down

 
PROPERTIES 

Product: 4D
Theme: User Interface
Number: 468

 
PAGE CONTENTS 
 
HISTORY 

Modified: 4D 2003
Modified: 4D v16 R4

 
ARTICLE USAGE

4D Language Reference ( 4D v20)
4D Language Reference ( 4D v20.1)
4D Language Reference ( 4D v20.2)
4D Language Reference ( 4D v20.3)
4D Language Reference ( 4D v20.4)
4D Language Reference ( 4D v20.5)
4D Language Reference ( 4D v20.6)