public void Dispose() { if (ShellIcon != null) { ShellIcon.Dispose(); ShellIcon = null; } } [DllImport("shell32")]