I have made my application minimize to the system tray however when i try to make it shown it does not spend so it gets stuck in the system tray, also if i do not open the notification area multiple system tray icons are visible until you hover over it what am i doing wrong
{
notifyIcon1.BalloonTipText = "application running...";
if (FormWindowState.Minimized == this.WindowState)
{
notifyIcon1.Visible = true;
notifyIcon1.ShowBalloonTip(500);
this.Hide();
}
else if (FormWindowState.Normal == this.WindowState)
{
notifyIcon1.Visible = false;
}
}
and then show it with
{
this.Show();
this.WindowState = FormWindowState.Normal;
}
Also how do i go about overriding the form closing so that it sends my application to the system tray