>Can anyone give me some examples of how to use the SYS(1270) command. What I want to know is how do I check to see if the user is clicking on the cancel button and wants to leave. Do I compare SYS(1270) to the name of the command button? The name of the command button is exitcancel. I tried SYS(1270) = exitcancel and that doesn't work. What is the correct way to check if a mouse cursor is on the cancel button...
SYS(1270) returns the object reference for the object under the mouse; it's not a name, but an object reference. If you wanted to look at the Name property of the thing under the mouse:
LOCAL oObjRef
oObjRef = SYS(1270)
IF TYPE('oObjRef.Name') = 'C' AND oObjRef.Name == "<i>name of the control</i>"
ELSE
ENDIF