I have an application which runs only from the System Tray, it's only purpose is to provide the user with information via Ballon Tips.
It's running well, apart from one minor annoyance. When the application is closed using the Task Manager (as opposed to using the context menu) the icon sticks around in the system tray, until you hover over it, then when another instance is opened you get a second icon sitting beside the first.
My Form Closed event looks like this, it does nothing:
private void frmMain_FormClosed(object sender, FormClosedEventArgs e)
{
ntfyIcon.Visible = false;
ntfyIcon.Icon = null;
ntfyIcon.Visible = false;
ntfyIcon.Dispose();
}
This has been reported on Microsoft Connect and has been closed by Microsoft under Won't Fix
as, apparently, this is what is supposed to happen but I was hoping that somebody had a solution.
I was thinking something along the lines of cleaning the system tray on application open?
Thanks