Skip to content

Creating hot keys in C#

Rajeeva Nagaraj

Asked Dec 13, 2007, 7:57 AM EST2 answers
Share
LinkedInX

Hi Everybody

Can anybody tell me that how can i create hot keys in c#,

Regards

Rajeev

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    That depends on what kind of hotkey you want. Do you want a shortcut key, or an access key?

    Access keys are created on all able form controls (except menu bars) by putting an ambersand "&" infront of the letter you want to making accessable and setting the "UseMnemonics" property of the control to true.

    Access keys for a menu bar are simply created by typing an ambersand before the letter you want to make accessible.

    Shortcut keys are created in menu items by setting the ShortcutKey property of the menu item to use a combination of CTRL + <the letter>, ALT + <the letter>, or SHIFT + <the letter>.
    0