getclick
VERTICAL
,
HORIZONTAL

The getclick statement returns the location of the mouse in global coordinates (coordinates from the top left corner of the screen).


Parameters

This statement has two parameters:

vertical – field or variable in which the vertical co-ordinate will be placed.

horizontal – field or variable in which the horizontal co-ordinate will be placed


Description

This statement is used to capture coordinates of the most recent mouse click. It is intended that this statement be used in a procedure that is triggered by a button on a form (or any form object that triggers a procedure).

This example checks to see if the mouse was clicked more than 5 pixels away from the previous mouse click.

fileglobal  mouseV,mouseH
local  newV,newH
define mouseV,0
define mouseH,0
getclick newV,newH
if  abs(newV-mouseV)>5 or abs(newH-mouseH)>5
    message  "Clicked far away"
endif 
mouseV=newV  // new click becomes old for next time
mouseH=newH

See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0.