protected override void OnExit(ExitEventArgs e) { this.Taskbar.Dispose(); // The icon would clean up automatically, but this is cleaner base.OnExit(e); }