I did not reproduce your problem and I'm running on Windows 10 Creators Update.
But I found that you could Dispose
your NotifyIcon
when you close your application. Dispose
can remove your icon out of the tray area of the taskbar.
I guess that you may have exited your program unexpectedly and that will cause your problem. You should check whether System.Exit()
or other unsafe exit method is called.
You can see the code below to know how to call the Dispose
:
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
protected override void OnClosed(EventArgs e)
{
base.OnClosed(e);
// Call Dispose to remove the icon out of notification area of Taskbar.
notifyIcon1.Dispose();
}
}