views:

23

answers:

1

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 these 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.

+1  A: 

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.

FrozenCow