C# - 独立 ContextMenuStrip - 一些挫折
我正在尝试制作一个基本上是 ContextMenuStrip 的程序,用户可以在其中添加自己的快捷方式等,并通过按热键组合来访问菜单。
我使菜单出现的方法是给主窗体 0% 不透明度,但如果有其他方法,请告诉我。
我的愿望是做这样的事情,只是更加可定制和用户友好: http://www.bullzip.com/products/exm/info.php
到目前为止我遇到了几个问题: - 首次显示菜单时,一切正常,但当我尝试再次按热键时,菜单出现,但任务栏中出现“空白”窗口。 - 同样,当菜单第一次显示时,一切都很好,但是当单击菜单上的其他位置时,它不会再次关闭。关闭它的唯一方法是从菜单中选择某些内容。
希望你们中的一些人能给我指出解决方案的方向:)
提前谢谢您!
I'm trying to make a program that basically is a ContextMenuStrip, where users can add their own shortcuts and so on and access the menu by pressing a hotkey combination.
The way I make the menu appear is by giving the main form 0% opacity, but if there is another way, please let me know.
My wish is to make something like this, just a lot more customizable and user-friendly:
http://www.bullzip.com/products/exm/info.php
So far I've had a couple of problems:
- When the menu is first shown, everything works fine, but when I try pressing the hotkey again, the menu appears, but so does a "blank" window in the taskbar.
- Again, when the menu is first shown, everything is fine, but when clicking anywhere else than on the menu, it won't close again. The only way to close it, is by selecting something from the menu.
Hopefully some of you can point me in the direction of a solution :)
Thank you in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这应该会为您隐藏表单。
然后使用以下方法捕获按键。
This should hide the form for you.
Then use the following to trap key presses.