Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hot-key assignment to Form Buttons

Status
Not open for further replies.

BoxPro1

Programmer
Apr 5, 2001
11
US
How does one add a Hot Key to a VFP 6.0 form button that had a Picture in place of a Text Label?
 
I would probably put the code in the keypress of the form, make sure the form's keypreview property is set to true.

 
You can also use 'on key labels' within a form, if you don't want the user to press buttons and would rather they press keys.
 
I would probably play it dirty and create the buttons with the hot keys off the screen ie at a negative left position on the screen; assign tab stop to .f. and for the click even, just run the click even of the button with the picture; setfocus to the picture button as well. Clearing you would need to disable these buttons if the picture buttons get disabled; but you would also have to test your on keys/keypress events if you go the on key label/keypress route anyway so it's a catch 22.

hope this helps

Gem aka "the new KID"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top