private void FormPrincipal_Load(object sender, EventArgs e) { this.Hide(); Login nueva = new Login(this); nueva.TopMost = true; nueva.Show(); PanelControl newMDIChild = new PanelControl(); newMDIChild.MdiParent = this; newMDIChild.WindowState = FormWindowState.Maximized; newMDIChild.Show(); }
private void panelToolStripMenuItem_Click(object sender, EventArgs e) { Form existe = Application.OpenForms.OfType <Form>().Where(pre => pre.Name == "PanelControl").SingleOrDefault <Form>(); if (existe != null) { existe.WindowState = FormWindowState.Maximized; existe.BringToFront(); } else { PanelControl newMDIChild = new PanelControl(); newMDIChild.MdiParent = this; newMDIChild.WindowState = FormWindowState.Maximized; newMDIChild.Show(); } }