예제 #1
0
 private void metroButton6_Click(object sender, EventArgs e)
 {
     if (ActiveMdiChild != null)
     {
         ActiveMdiChild.Close();
     }
     demo1.Form1 newMDIChild = new demo1.Form1();
     // Set the Parent Form of the Child window.
     newMDIChild.MdiParent = this;
     // Display the new form.
     newMDIChild.Show();
     newMDIChild.Dock = DockStyle.Fill;
 }
예제 #2
0
 private void adhome_Load(object sender, EventArgs e)
 {
     metroButton6.Select();
     if (ActiveMdiChild != null)
     {
         ActiveMdiChild.Close();
     }
     demo1.Form1 newMDIChild = new demo1.Form1();
     // Set the Parent Form of the Child window.
     newMDIChild.MdiParent = this;
     // Display the new form.
     newMDIChild.Show();
     newMDIChild.Dock    = DockStyle.Fill;
     metroPanel5.Visible = false;
     metroPanel9.Visible = false;
     metroPanel7.Visible = false;
     metroPanel8.Visible = false;
 }