private void tslblCad_Click(object sender, EventArgs e) { frmLogar frmLogar = new frmLogar(); frmLogar.MdiParent = this; frmLogar.Show(); }
private void LogSen_Click(object sender, EventArgs e) { if (Application.OpenForms.OfType <frmLogar>().Count() > 0) { MessageBox.Show("FORMULÁRIO DE CADASTRO DE SENHA JÁ ESTÁ ABERTO"); return; } else { frmLogar frmLogar = new frmLogar(); frmLogar.MdiParent = this; expandablePanel2.Expanded = false; frmLogar.Show(); } }