如何在 C# 中使用两个 NotifyIcons,而当我将鼠标悬停在上面时,第二个 NotifyIcons 不会消失?
我有一个 VS2008 应用程序需要在系统托盘中显示两个通知图标。第一个是主应用程序图标,可以快速访问 GUI。第二个是“新消息”图标,当新消息到达时显示,当用户双击它时隐藏,很像新的 Outlook 邮件消息图标。
我遇到的问题是,每当鼠标移到系统托盘上时,第二个消息图标就会隐藏。第一个图标的行为符合预期,并且在应用程序运行时保留在系统托盘中。
有什么想法吗?
I Have a VS2008 app that needs to display two notifyIcons in the System tray. One is the main application icon, which allows quick access to the GUI. The second is a "new message" icon, which is displayed when a new message arrives, and hidden when the user double-clicks on it, much like the new Outlook mail message icon.
The problem i am having is the second message icon is hidden whenever the mouse is moved over the system tray. The first icon behaves as expected, and remains in the system tray while the application is running.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
谢谢 - 这部分是由于 Windows 故障和我的代码中的错误。
当显示气球尖端时,图标似乎不会保持可见 - 在显示气球尖端之前必须强制显示该图标。直到我将鼠标移到托盘上,图标才刷新。
Thanks - this was partly due to windows glitch and a bug in my code.
Seems the icon will not stay visible when showing a baloon tip - it must be forced visible before showing the baloon tip. The icon did not refresh until i moved my mouse over the tray.