开发者

Winform shortcut key sub menu item

开发者 https://www.devze.com 2023-03-26 11:03 出处:网络
I\'m trying to create shortcut keys for a sub menu item on a context menu in WinForm but it doesnt work/ event does not get fired.

I'm trying to create shortcut keys for a sub menu item on a context menu in WinForm but it doesnt work/ event does not get fired. E.g context menu.

Find

-----By Word (Alt + W)

-----By Name (Alt + N)

Cut (Alt + C)

Copy (Alt + X)

Paste (Alt + P)

The shortcut keys for Cut, Copy, and Paste work but shortcut keys for By Word and By Name does not work. The shortcut ke开发者_运维百科ys are hooked up using the control properties, and none of the shortcuts are used anywhere else.

Is anyone else having the same problem?


This theorically could happen if you have mainbar menu items which begin with W or N. Alt+Key combination gives a focus on menu usually.

If this is not a case, there could be an application on your system that setupped hook on that combinations ( for example multidesktop manager...).

Like a prove to this theory, try to change desired keys combination and see if it works.

Regards.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号