在菜单项中使用快捷键 [英] use shortcutkeys in menuitem
本文介绍了在菜单项中使用快捷键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有menuStrip,并添加了som menuItem,例如File,User,..
我为用户"菜单设置了快捷键,ALT + U
我如何使用表单中的键?就像用户按下ALT + U
用户菜单打开,例如当用户单击用户菜单时.
用户菜单发生什么事件?
Thankyou
i have menuStrip,and add som menuItem for example File,User,..
i set shortcutkeys for User menu,ALT+U
how do i use keys in my form?i like when user pressed ALT+U
that User menu opening such as when user clik on User menu.
what event of User menu?
thankyou
推荐答案
每个菜单项都有一个shortcut
^ ].
您可以在此属性中定义按键组合.
另外,您可以使用&符号,同时定义文本.
例如,如果将E& xit定义为菜单文本,则alt + x将执行此菜单项的菜单代码.
此链接 [
Every menuitem has ashortcut
property[^].
You can define keystroke combinations in this property.
In addition you can use the & symbol while defining text.
For example, if you define E&xit as the text for a menu, alt + x will execute the menu''s code for this menu item.
This link[^] is a good tutorial.
这篇关于在菜单项中使用快捷键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文