private void MerchandiseEntering_Click(object sender, EventArgs e) { try { merchandiseEnteringDlg.Visible = true; merchandiseEnteringDlg.Focus(); } catch (System.Exception ex) { Trace.WriteLine(ex.ToString()); merchandiseEnteringDlg = new MerchandiseEnteringDlg(); merchandiseEnteringDlg.Show(); } }