Open a menu in code

I have a client upgrading their office from a dos based program to one I am writing, but they want the program to be as similar as possible to the old one.

This means that the program uses no mouse support at all and the want the menus to be opened by a single key press. Can anyone tell me how to open a main menu by hitting a single key  In this case the left or right arrow key


Answer this question

Open a menu in code

  • bwells

    Unfortunately the people using this program are currently challenged by turning a computer on :(

    They are extremely unwilling to have to try and retrain their staff and if it came down to it would rather stay with their current program rather than have to retrain.

    The program doesn't have to use a menu though, they could get away with using a series of list/combo boxes if there is a way of opening them in code

  • AliSyed

    So they aren't willing to use mnemonics   Like Alt+F 

    If not, you can override PreProcessMessage on your form to acquire all keyboard input prior to them being dispatched to the controls.  It's kind of complicated because there aren't built in methods to show a main menu.  I might be able to whip together a sample if no one else has any ideas and if mnemonics aren't acceptable...


  • Open a menu in code