Kbase P12095: How to get the Mouse X and Y co-ordinates with Progress
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  8/21/2003 |
|
Status: Unverified
GOAL:
How to get the Mouse X and Y co-ordinates with Progress
FIX:
To get the X and Y co-ordinates of the mouse pointer you can use the LAST-EVENT system handle and the X and Y attributes.
For example, add the following code to your mouse event trigger for the Window/Frame:
MESSAGE LAST-EVENT:X
LAST-EVENT:Y VIEW-AS ALERT-BOX.
Alternatively if you would like to retrieve these co-ordinates anywhere, then placing the following in the Main Block will achieve this:
ON 'LEFT-MOUSE-CLICK' ANYWHERE DO:
MESSAGE LAST-EVENT:X
LAST-EVENT:Y VIEW-AS ALERT-BOX.
END.