I\'ve got a .Net 3.5 C# Winforms app. It\'s got no GUI as such, just a NotifyIcon with a ContextMenu.
I\'ve tried to set the NotifyIcon to visible=false and dispose
This code worked for me
this.Closed += (a, b) => { if (notifyIcon1 != null) { notifyIcon1.Dispose(); notifyIcon1.Icon = null; notifyIcon1.Visible = false; } };