/// <summary> /// Abort any child threads upon exit /// </summary> private void appExit(object sender, System.EventArgs e) { try { if (conf.RunFromTrayNow) { PInvoke.UnregisterHotKey(Handle, 101); } if (trayIcon != null) { trayIcon.Visible = false; } if (conf.lastNw != null) { conf.lastNw.Close(); } } catch { } finally { if (updateThread != null && updateThread.IsAlive) { updateThread.Abort(); } if (auxThread != null && auxThread.IsAlive) { auxThread.Abort(); } } }