//Unload the tray manager and all icons. public static void Dispose() { if (trayIcons != null) { for (Int32 i = 0; i <= trayIcons.GetUpperBound(0); i++) { trayIcons[i].Dispose(); trayIcons[i] = null; } } dummyIcon.Dispose(); dummyIcon = null; TrayMenu.Dispose(); TrayMenu = null; InvokeControl.Dispose(); InvokeControl = null; }