Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
I _Need_ OKLs
Message
 
To
02/07/1999 19:49:58
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00237089
Message ID:
00237092
Views:
10
Harry,

If you want F9 to be the hotkey to a button do it in the form's keypress event with the KeyPreview for the fomr set to .T.;
* KeyPress
LPARAMETERS nKeyCode ...
IF nKeyCode = -8 && F9
   NODEFAULT && Stop VFP key processing
   Thisform.Whatever.Click()
ENDIF
Now why doesn't OKL work. Because the command assinged to the OKL is being run outside of the form and therefore the Thisform reference means nothing. Also OKL's are intercomand interrupts, that means they will interrupt running code. In VFP the only valid reason to use an OKL is to interrupot running code and even that can be accomplished without using an OKL.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform