示例#1
0
        private void combosToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form frmCliente = this.MdiChildren.FirstOrDefault(i => i is FrmCombo);

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

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