private void btnEditarFunc_Click(object sender, EventArgs e) { VerificaFormAberto(); pnlForm.Visible = true; frmEditarFunc editarFunc = new frmEditarFunc(); editarFunc.TopLevel = false; pnlForm.Controls.Add(editarFunc); editarFunc.Show(); }
private void btnEditarFunc_Click(object sender, EventArgs e) { VerificaFormAberto(); frmEditarFunc editarFunc = new frmEditarFunc(); if (Application.OpenForms.OfType <frmEditarFunc>().Count() > 0) { Application.OpenForms[editarFunc.Name].Focus(); } else { editarFunc.Show(); editarFunc.DesktopLocation = new Point(629, 288); } }