Click here to Skip to main content
16,019,614 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Use keyboard for selecting menu items in vb.net.
All the menu item may use through keyboard. please sending the code.

i want to selecting menu items totatly through keyboard....
Posted
Updated 19-Dec-10 22:25pm
v4
Comments
Sandeep Mewara 20-Dec-10 3:49am    
1. Read on how to post questions here: http://www.codeproject.com/Questions/ask.aspx
2. Your question does not make much sense. Use 'Improve Question' button and edit/update it
3. Don't forget to tell what you tried and where you got stuck. Error(what error) if any.

1 solution

Two ways to do it:
1) Place an '&' character in front of the character you want the user to use as a hot-key. This will underline that character, and allow [ALT]+ Key to open the menu, and Key to activate once the menu is open.
"&File" - [ALT]+F opens the file menu.
..."&Save" - S will save the file.

2) Highlight the menu item in the designer. Use the ShortcutKeys property. This will provide a hot key within the current form to activate the menu item.


'&' in a button text has the same effect.

There is also a way to use [ALT] + key combinations within the form for non-button items:
1) Place a label immediately before the control in the tab order (there is menu button in VS to show / change the tab order).
2) Use the '&' character as above.
 
Share this answer
 

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