private void toolStripMenuItem4_Click(object sender, EventArgs e) { using (BeginWaitCursorBlock()) { Form f = Application.OpenForms["FrmInventory"]; if (f != null) { f.BringToFront(); } else { FrmInventory inv = new FrmInventory(); inv.MdiParent = this; inv.Show(); } } }
private void btnAddInventory_Click(object sender, EventArgs e) { try { Form f = Application.OpenForms["FrmInventory"]; if (f != null) { f.BringToFront(); } else { FrmInventory inv = new FrmInventory(); inv.MdiParent = this.MdiParent; inv.Show(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }