Results 1 to 4 of 4

Thread: How can I add keyboard shortcuts to a menu items?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2013
    Posts
    24

    Question How can I add keyboard shortcuts to a menu items?

    How can I add functional keyboard shortcuts to menu items?


    ex: New Project Ctrl + N

  2. #2
    Fanatic Member
    Join Date
    Dec 2007
    Location
    West Yorkshire, UK
    Posts
    791

    Re: How can I add keyboard shortcuts to a menu items?

    The way I have always done it is to use the ampersand in the name.
    for example .Text = &New gives New and Ctrl+N is the keyboard shortcut.
    Is that what you are after?

  3. #3

    Thread Starter
    Junior Member
    Join Date
    May 2013
    Posts
    24

    Re: How can I add keyboard shortcuts to a menu items?

    Yes it is. That seemed to work, thank you.

  4. #4
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Posts
    12,371

    Re: How can I add keyboard shortcuts to a menu items?

    Also, to assign shortcuts to menustripitems, there is a ShortCutKey property. You can set it in design time or in code.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | HtmlLessons | CssLessons | Code Tags | Sword of Fury - Jameram

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width