Search code examples
c#systray

Why am I seeing multiple Systray Icons?


I've added a Notify Icon to my app, and quite often I see up to 3 copies of the notify icon in my systray. is there a reason for this?

is there a way to stop it from happening.

Often this persists after my app has closed, untill I mose over to the systray and the systray expands and collapses snd then they all disapear.


Solution

  • Is this while you are debugging your application? if so this is because the messages that remove the icon from the system tray are only sent when the application exits normally, if it terminates because of an exception or because you terminate it from Visual Studio the icon will remain until you mouse over it.