Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Menus

Menus

Scheduled Pinned Locked Moved C#
helptutorialquestionworkspace
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    Omega501
    wrote on last edited by
    #1

    I have a client who wants to upgrade their office to a windows environment, but they want it to be as similar as an old dos program they've been using since the year dot. Because of this, I have to make a program that they can navigate entirely with the keyboard. Currently I am stuck trying to work out how to make the menus either get the focus (so they can use the arrow keys to navigate), or make a menu open just from a keypress. I have tried calling the MenuItem.Select or MenuItem.PerformClick method, but neither of these seems to bring the focus to the menu. Does anyone have an idea where to look for this? - I have seen hundreds of articles on how to create a menu item when i searched, but none to simply open a menu.

    C 1 Reply Last reply
    0
    • O Omega501

      I have a client who wants to upgrade their office to a windows environment, but they want it to be as similar as an old dos program they've been using since the year dot. Because of this, I have to make a program that they can navigate entirely with the keyboard. Currently I am stuck trying to work out how to make the menus either get the focus (so they can use the arrow keys to navigate), or make a menu open just from a keypress. I have tried calling the MenuItem.Select or MenuItem.PerformClick method, but neither of these seems to bring the focus to the menu. Does anyone have an idea where to look for this? - I have seen hundreds of articles on how to create a menu item when i searched, but none to simply open a menu.

      C Offline
      C Offline
      cdehelean
      wrote on last edited by
      #2

      1. In the menu item, define the Text with ampersand ex: &File. Then you can use the shortcut ALT+F to get to this menu 2. Look after accelerators in MSDN

      O 1 Reply Last reply
      0
      • C cdehelean

        1. In the menu item, define the Text with ampersand ex: &File. Then you can use the shortcut ALT+F to get to this menu 2. Look after accelerators in MSDN

        O Offline
        O Offline
        Omega501
        wrote on last edited by
        #3

        Unfortunately that won't work for this program. Because of the way the dos program was structured I need to be able to press a single key (in this case the left or right arrow) to open the menu's. Most of the staff that use this program might be able to turn a computer on on a very good day and the owner doesn't want to have to retrain them (hah) to learn to use a new program. What I am looking for is the equivalent of menu.open or menu.focus (as such), ie: how can I call the equivalent of a mouse click on a menu in code to make the menu open? MenuItem.PerformClick would work, if I knew how to tell the menu to open.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups