how to set AltN in shortcut?

  • Thread starter Thread starter newbie_csharp
  • Start date Start date
Hi,

You don't need to specially set a shortcut for Alt+(character) combinations
like Alt+x. This funtionality is automatically provided by just adding a '&'
before the character you want the shortcut to be in the Menu name.

Because of this, no Alt+character combinations are available in the shortcut
property.

For example, if the menu name is File and you want the shortcut as Alt+F,
then you would the Text property as '&File'.

HTH,
Rakesh Rajan
 
Well that is not exactly true. Hotkeys doesn't work the same way shortcuts
do.

To answer to the question... No, you can not. If you want to attach a
shortcut to a menu item you can use only ones in the Shortcut enumeration.
That property checks the value whether is among Shortcut enum's values and
if it is not it throws an exception.

Setting different value can be done easely, with the current version of
..NET, by setting one private field using reflection, but that kind of hacks
I wouldn't recommend to anyone.
 
Back
Top