private void btProcessosnegados_Click(object sender, EventArgs e)
        {
            TelaProcessosNegados telanegados = new TelaProcessosNegados();

            telanegados.MdiParent = this;
            panel5.Controls.Add(telanegados);
            telanegados.Show();
        }
Exemple #2
0
        private void btProcessosnegados_Click(object sender, EventArgs e)
        {
            TelaProcessosNegados telanegados = new TelaProcessosNegados();

            telanegados.MdiParent = this;
            panel5.Controls.Add(telanegados);
            if (Application.OpenForms.OfType <TelaProcessosNegados>().Count() > 0)
            {
                MessageBox.Show("Esta janela já está em execução.", "!",
                                MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                Application.OpenForms.OfType <TelaProcessosNegados>().First().Focus();
            }
            else
            {
                telanegados.Show();
            }
        }