private void combosToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            Form frmCliente = this.MdiChildren.FirstOrDefault(i => i is FrmBDCombo);

            frmCliente = new FrmBDCombo() { MdiParent = this }; // test
            frmCliente.Focus();
        }
Exemple #2
0
        private void combosToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            try
            {
                Form frmCliente = this.MdiChildren.FirstOrDefault(i => i is FrmBDCombo);

                if (frmCliente == null)
                {
                    frmCliente = new FrmBDCombo() { MdiParent = this };
                }
                frmCliente.Focus();
            }
            catch (Exception)
            {
                MessageBox.Show("Falha na aplicação!", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }