Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form KeyPress event and function keys
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00439823
Message ID:
00440665
Views:
14
Ashley,

I think you have something else in your class hierarchy or environment that is causing your problem.

I created a form from the VFP baseclass, dropped a baseclass text box on the form. set KeyPreview=.t. and had this form.KeyPress() method

LPARAMETERS nKeyCode, nShiftAltCtrl
debugout nKeyCode

Whether the Form is Modal or Modeless the function keys (except for F1 and F10) all echo valuesin the debug window.

>I'm trying to trap function keys pressed on a modal form. I have set the form's KeyPreview property to .T., which help says will have the form intercept the keystrokes before the controls do. This does not seem to work.. I am echoing the keystrokes to a wait window and it seems to trap the TAB and BACKSPACE keys only.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform