Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP6 Form Hotkey Buttons?
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00171337
Message ID:
00171499
Views:
30
>You could use an invisible button (Style=1), assign it a hotkey, set the tabstop property to .F. and place it outside the visible area of the form. In its GotFocus event you set the focus to the picture button and issue a KEYBOARD "{SPACEBAR}" to fire the click event.

Rather than KEYBOARD "{SPACEBAR}", you can put both SetFocus and Click in the invisible button's GotFocus.

Seems to me that using the form's KeyPress method and KeyPreview property is a simpler solution, though.
Rich Addison, Micro Vane, Inc., Kalamazoo, MI
Relax, don't worry, have a homebrew.
- Charlie Papazian, The New Complete Joy of Home Brewing
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform