private void btnCerrar_Click(object sender, EventArgs e) { frmInicio inicio = new frmInicio(); inicio.Show(); this.Close(); }
private void IniciarSesion() { foreach (Form Ariel in Application.OpenForms) { if (Ariel.GetType() == typeof(frmInicio)) { MessageBox.Show("¿¿Que haces?? ¡ya esta abierta!"); return; } } frmInicio Inicio = new frmInicio(); Inicio.MdiParent = this; Inicio.WindowState = FormWindowState.Maximized; Inicio.Show(); }