Menus
-
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.
-
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.
-
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
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.