private void Commandform_Closing(object sender, System.ComponentModel.CancelEventArgs e) { try { m_commandTarget.remove(); } catch (Exception) { } Environment.Exit(0); }