Example #1
0
 private void frmMain_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     // Clean up the child form if it's there
     if (!(mfrmMod == null))
     {
         try
         {
             mfrmMod.Owner         = null;
             mfrmMod.ParentProcess = null;
             mfrmMod.Close();
             mfrmMod.Dispose();
             mfrmMod = null;
         }
         catch (Exception exp)
         {
             MessageBox.Show(exp.Message, exp.Source, MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
 }