c# - 托盘图标未显示

发布于 2024-09-17 20:31:26 字数 355 浏览 13 评论 0原文

我在主窗体上设置了 NotifyIcon,但是当窗体运行时,通知图标没有出现?

我将其可见属性设置为 true,如果我尝试显示气球工具提示:

ntiTrayIcon.ShowBalloonTip(1000, "Info:", "Double click this icon to close AlwaysOnTop", ToolTipIcon.Info);

那也不会显示。

有什么问题吗?

表格上的一些信息: 它是一个 SizeableToolWindow,它没有控制框或标题(因此它仅显示为边框),并且在一段时间后隐藏(它本质上是注册一些全局键盘挂钩的启动屏幕),这会是问题吗?

I have a NotifyIcon set up on my main form, however when the form ran the notification icon doesn't appear?

I have it's visible attribute set to true and if I try to show a balloon tooltip:

ntiTrayIcon.ShowBalloonTip(1000, "Info:", "Double click this icon to close AlwaysOnTop", ToolTipIcon.Info);

That doesn't show either.

What's the problem?

Some Info on the form:
It's a SizeableToolWindow and it has no control box or caption (so it shows up as just the borders) and it gets hidden after a while (it's essentially a splash screen that registers some global keyboard hooks), would this be the problem?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

请止步禁区 2024-09-24 20:31:26

尝试在表单构造函数中添加这一行

trayIcon.Icon = new Icon(SystemIcons.Application, 40, 40);

Try to add this line in your form constructor

trayIcon.Icon = new Icon(SystemIcons.Application, 40, 40);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文