开发者

Tray Icons Keep On Popping Up

开发者 https://www.devze.com 2023-01-02 20:45 出处:网络
I have a WinForm program that checks a database for changes, and if there are any, it will open another WinForm telling the user what is happening (the popup WinForm has some special functionality mak

I have a WinForm program that checks a database for changes, and if there are any, it will open another WinForm telling the user what is happening (the popup WinForm has some special functionality making a MessageBox insufficient for this task). Each time one of thes开发者_如何学Ce popup WinForms shows up, a new icon shows up in the system tray and does not go away even if you hover over it (this isn't a tray refresh issue).

What I'm wondering is how to get the popup WinForm to display no tray icon at all.


You might be doing something like 'new NotifyIcon' in the wrong places (like the constructor of your popup-form). It gets created, but if you never call NotifyIcon.Dispose() it will stay until you stop your program and hover you mouse over the icon.

Another cause might be that you have added the NotifyIcon as a component to the popup-form in the designer.

0

精彩评论

暂无评论...
验证码 换一张
取 消