Click here to Skip to main content
14,695,505 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi All,

Am working on windows form C# application .Am added the menu trip and menu items . I need keyboard shortcut for accessing the menu . IF i hit enter Key, it should go to next field ( = to pressing tab) if i am in one text field, if i hit enter, it should go to next..How can i achieve these..

thanks in advance

If you look at your menu items, they have a property ShortcutKeys[^] which will (predictably) set the keyboard shortcut...

As for the Enter key, please don't.
This is a major change to the expected behaviour of the Enter key - that it is "I've finished - take this dialog away" which can only confuse users. It is strongly recommended that you do not change normal expected behaviour for one app - it confuses and annoys users and will normally make users more reluctant to use your application.
Hello You can refer this website
Windows Forms Programming with C# - Chapter 3: Menus

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900