
Accelerator keys in VB.NET
Hello,
Quote:
> What is the best way to handle accelerator keys in .NET? Is there some
> automatic setting to enable and catch this, or do we have to write code
> (i.e. in the OnKeyDown sub for the form)? Basically, if they hit an
> accelerator key (such as Ctrl-A) on the form I want it to 'press' the
Clear
> button I have defined on the form.
Define a hidden menu and select the accelerator in the items' Shortcut
property. Then you can add the code into the click event handler of the menu
item.
Regards,
Herfried K. Wagner