奇怪的通知图标行为. [英] Strange Notify Icon behavior.

查看:50
本文介绍了奇怪的通知图标行为.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一段时间以来,我一直在使用NotifyIcon和我的一个应用程序.我没有对其任何事件或用法进行任何更改,但是我发现图标每分钟都会添加到托盘中,但并不总是在同一时间范围内.当我将鼠标悬停在新图标上时,它们便消失了-非常烦人且不专业的外观.有什么想法吗?

I have been using the NotifyIcon with one of my app for some time. I have made no changes to any of it''s events or usage, but I see the icon getting added to the tray every minute , but not always the same time frame. When I hover the mouse over the new icon they simply disappear - very annoying and unprofessional look. Any ideas?

推荐答案

好吧,我可以想到两件事可以解决这个问题.

1)您的应用程序放置了一个托盘图标,但最终以无提示的方式崩溃并重新启动,从而创建了另一个图标.希望您不要通过Windows Service应用程序执行此操作...

2)您的代码正在执行频繁地实例化任务栏图标的代码,并且没有正确处理以前的图标实例.
Well, I can think of two things that would do this off the top of my head.

1) Your app puts up a tray icon, but then ends up crashing silently and relaunching somehow, creating another icon. I hope you''re not doing this from a Windows Service app...

2) Your code is executing the code that instantiates the tray icon every so often and not properly disposing of the previous icon instance.


它似乎是固定的.确实很奇怪!在我的FTP类中,这似乎是一个错误的方法调用-两年来一直没有出现问题.我摆脱了测试连接方法,而只是尝试/捕获ftp对象.非常感谢Dave的帮助和礼貌.
It appears to be fixed. Strange indeed! It appears to be a bad method call in my FTP class - which has worked without problem for 2 years. I got rid of the test connection method and just Try/Catch the ftp object. Big thanks to Dave for being helpful and courteous.


这篇关于奇怪的通知图标行为.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆