Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Keyboard shortcuts
Message
 
To
04/01/1999 18:02:06
Daniel Christensen
University of Wisconsin River Falls
River Falls, Wisconsin, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00172591
Message ID:
00172594
Views:
26
>when a control is in focus that responds to the shortcut that I'm trying to use [...] the control handles the keyboard shortcut before the forms keypress event ever sees it. Is there a way to override the kepress events in the controls on the form or is there in general a better way to deal with keyboard shortcuts?

1) form.KeyPreview = .T.
2) in form.KeyPress, in the CASE for appropriate keystroke: NODEFAULT

Other suggestion:
If your form's KeyPress method is handling the keystroke by setting focus to, and/or clicking, the appropriate object, you don't need to also handle that keystroke in the object's KeyPress event. Are you doing that? If so, take that code out the object's KeyPress method.

HTH
Rich Addison, Micro Vane, Inc., Kalamazoo, MI
Relax, don't worry, have a homebrew.
- Charlie Papazian, The New Complete Joy of Home Brewing
Previous
Reply
Map
View

Click here to load this message in the networking platform