private void btnSalidas_Click(object sender, EventArgs e) { //comprueba si ya esta abierto el formulario de salidas Form existe = Application.OpenForms.OfType <Form>().Where(pre => pre.Name == "MDISalidas").SingleOrDefault <Form>(); if (existe == null) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } this.LayoutMdi(MdiLayout.TileHorizontal); Form f = new MDISalidas(); f.MdiParent = this; f.Show(); f.WindowState = FormWindowState.Minimized; f.WindowState = FormWindowState.Maximized; } }
public Salidas(MDISalidas fSalidas) { this.fSalidas = fSalidas; InitializeComponent(); }