C# - Windows 2000 BalloonTip 事件解决方法
我一直在寻找解决方法,但除了“只需让他们单击 NotifyIcon”之外什么也没找到。
Windows 2000 显然不支持 BalloonTip 事件,但我需要一种方法来检测气球提示何时被单击或关闭。所以我在想是否有一种方法可以让我的程序知道气球提示当前是否显示,然后我可以创建一个计时器来检查气球提示是否不再显示。也许是这样的:
timer_tick(object sender, EventArgs e)
{
if (!balloonTipDisplayed())
{
//balloon is closed, do somthing...
}
}
有人知道有办法做到这一点吗?或者也许有更好的解决方法? 感谢您的任何帮助。
Ive been looking all over for a workaround for this but have found nothing besides "Just have them click the NotifyIcon".
Windows 2000 obviously does not support BalloonTip events but I need a way to detect when either the balloon tip is clicked or closed. So I was thinking if there was a way for my program to know if the balloonTip is currently displayed, then I can create a timer that checks if the balloonTip is no longer displayed. Maybe something like this:
timer_tick(object sender, EventArgs e)
{
if (!balloonTipDisplayed())
{
//balloon is closed, do somthing...
}
}
Does anyone know of a way to do this? Or maybe have a better workaround?
Thanks for any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
据我所知,没有什么可以解决这个问题。 Windows 2000 UI 中没有可以触发的事件。我为此奋斗了一段时间,最后只为 Windows 2000 编写了一些东西。我使用了另一个 Windows 窗体,它在屏幕右下角显示为“始终在顶部”来模拟它。不漂亮,但它有效:)
There is nothing out there to resolve that AFAIK. There is no event in the Windows 2000 UI which can be fired. It's something I battled with for a while and ended up writing something to do it instead for just Windows 2000. I used another Windows Form which was shown "always on top" in the bottom right hand corner of the screen to emulate it. Not pretty but it worked :)
我听从了克里斯的话,最终找到了这个伟大的项目:
TaskbarNotifier
它适用于 2000 和 XP,这正是我所需要的,甚至看起来比气球提示更好。
I took what Chris said and ended up finding this great project:
TaskbarNotifier
It works in 2000 and XP which is just what i need, and it even looks nicer than a balloonTip.