ContextMenuStrip 在 NotifyIcon 上可用,但在 ContextMenu 上不可用?
我正在将 ContextMenu 添加到 WinForm 应用程序,并且希望将其关联到 NotifyIcon。问题是 NotifyIcon 的属性仅包括 ContextMenuStrip,而不包括 ContextMenu。
如何向我的图标添加上下文菜单?
谢谢!
I'm adding a ContextMenu to a WinForm application and I want to associate it to a NotifyIcon. The issue is the NotifyIcon's properties only include ContextMenuStrip and not ContextMenu.
How can I add a ContextMenu to my icon?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看看这里我看到它有ContextMenu 属性。您使用什么版本的.Net?也许您正在查看属性网格?您可能必须在代码中设置该属性。
Looking here I see it has a ContextMenu property. What version of .Net are you using? Perhaps you are looking at the property grid? You might have to set that property in code.