コード例 #1
0
 private void titleToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (Application.OpenForms.OfType <formTitle>().Count() == 0)
     {
         frmTitle           = new formTitle();
         frmTitle.MdiParent = this;
         frmTitle.Dock      = DockStyle.Fill;
         frmTitle.Show();
         frmTitle.BringToFront();
         frmTitle.WindowState = FormWindowState.Minimized;
         frmTitle.WindowState = FormWindowState.Maximized;
     }
     else
     {
         reopenTheForm(typeof(formTitle));
     }
 }
コード例 #2
0
 private void btnTitle_Click(object sender, EventArgs e)
 {
     if (Application.OpenForms.OfType <formTitle>().Count() == 0)
     {
         frmTitle = new formTitle();
         // Set the Parent Form of the Child window.
         frmTitle.MdiParent = MdiParent;
         // Fill the parent form and bring it to front.
         frmTitle.Dock = DockStyle.Fill;
         // Display the new form and maximize to fill the parent MDI.
         frmTitle.Show();
         frmTitle.BringToFront();
         frmTitle.WindowState = FormWindowState.Minimized;
         frmTitle.WindowState = FormWindowState.Maximized;
     }
     else
     {
         formBERP.reopenTheForm(typeof(formTitle));
     }
 }