private void panel1_Click(object sender, EventArgs e) { //Bring To Front (Child Form) //Nikko Melgar foreach (Form form in Application.OpenForms) { if (form.GetType() == typeof(CashReplenishment)) { form.Activate(); return; } } CashReplenishment frm = new CashReplenishment(); MainForm main = new MainForm(); frm.Show(); frm.MdiParent = main; }
private void btnReplenishment_Click(object sender, EventArgs e) { //Hide sub menu Process panelSavings.Visible = false; //controls foreach (Form form in Application.OpenForms) { if (form.GetType() == typeof(CashReplenishment)) { form.Activate(); return; } } CashReplenishment frm = new CashReplenishment(); frm.Show(); frm.MdiParent = this; }