private void btProcessAndamento_Click(object sender, EventArgs e)
        {
            TelaProcessosAndamento telaandamento = new TelaProcessosAndamento();

            telaandamento.MdiParent = this;
            panel5.Controls.Add(telaandamento);
            telaandamento.Show();
        }
Example #2
0
        private void btProcessAndamento_Click(object sender, EventArgs e)
        {
            TelaProcessosAndamento telaandamento = new TelaProcessosAndamento();

            telaandamento.MdiParent = this;
            panel5.Controls.Add(telaandamento);

            if (Application.OpenForms.OfType <TelaProcessosAndamento>().Count() > 0)
            {
                MessageBox.Show("Esta janela já está em execução.", "!",
                                MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                Application.OpenForms.OfType <TelaProcessosAndamento>().First().Focus();
            }
            else
            {
                telaandamento.Show();
            }
        }