在菜单项中使用快捷键 [英] use shortcutkeys in menuitem

查看:81
本文介绍了在菜单项中使用快捷键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有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 此链接 [
Every menuitem has a shortcut 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆