private void fuelControlToolStripMenuItem_Click(object sender, EventArgs e) { //MainPannelMDI.Controls.Clear();//contentpnl is the panelname foreach (Form form in Application.OpenForms) { if (form.GetType() == typeof(Admin_Controller)) { form.Activate(); return; } } Admin_Controller main = new Admin_Controller(); main.MdiParent = this; main.Show(); }
private void fuelControlToolStripMenuItem_Click(object sender, EventArgs e) { foreach (Form form in Application.OpenForms) { if (form.GetType() == typeof(Admin_Controller)) { form.Activate(); return; } } Admin_Controller main = new Admin_Controller(); main.MdiParent = this; main.Show(); main.WindowState = FormWindowState.Maximized; }