private void btn_Venda_Click(object sender, EventArgs e) { foreach (Form form in Application.OpenForms) { if (form.GetType() == typeof(frmVendas)) { form.Activate(); return; } } Form newForm = new frmVendas(); newForm.MdiParent = this; newForm.Show(); //frmVendas venda = new frmVendas(); //venda.MdiParent = this; //venda.Show(); }
private void btn_VendasProdutos_Click(object sender, EventArgs e) { try { frmVendas formVendas = new frmVendas(); formVendas.MdiParent = this; formVendas.Show(); } catch (Exception Erro) { MessageBox.Show("Erro Ao Chamar O Formulario: " + Erro.Message, "Erro"); } }