Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I use the SYS() command?
Message
From
05/01/2000 20:09:51
 
 
To
05/01/2000 19:53:28
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00313622
Message ID:
00313634
Views:
40
>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>"
   *  Found it
ELSE
   *  not
ENDIF
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform