예제 #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            bool  isOpen = false;
            Form1 form1  = new Form1();

            if (Application.OpenForms["Form1"] != null)
            {
                if ((Application.OpenForms["Form1"].Text).Equals("MSS Information Centre"))
                {
                    isOpen = true;
                }
                if (isOpen == true)
                {
                    form1.Focus();
                    this.Close();
                }
                else
                {
                    isOpen = true;
                    form1.Show();
                    form1.Focus();
                    //this.Close();
                }
            }
            //this.Close();
        }
예제 #2
0
 private void nuevoToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Form1 hijo = new Form1();
     hijo.MdiParent = this;
     hijo.Show();
     hijo.Focus();
 }