Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ON KEY LABEL
Message
From
21/11/2001 07:33:05
 
 
To
21/11/2001 07:15:04
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00584338
Message ID:
00584396
Views:
29
>>> How to use On key label eg. F1 to run a method in form? <<
>
>OKL's in a production environment are a bad idea because they interrupt whatever is happening at the moment.
>
>A better idea would be to set the form's KeyPreview property to true and put code like this in the form's KeyPress:
>

Thanks, Marcia, I knew I left out something - setting the KeyPreview property.

>
>IF nKeyCode = -2  && F3
>  This.MyMethod()
>ENDIF
>
>
>Using F1 is a bad idea because F1 is used to bring up help.
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
Next
Reply
Map
View

Click here to load this message in the networking platform