Set the Form's keypreview property to true. In the Form's KeyDown event,
catch the key and call the same procedure as you call in the button's click
event. Or, if the Form has a Menu, add the function as a menu item and
assign F8 as the shortcut. In the click event, invoke the code.
Set the Form's keypreview property to true. In the Form's KeyDown event,
catch the key and call the same procedure as you call in the button's
click
event. Or, if the Form has a Menu, add the function as a menu item and
assign F8 as the shortcut. In the click event, invoke the code.
Note that if you are using the standard menu control (not the toolstrip) the
menu item doesn't even need to be visible in order to make the shortcut
work.