Esempio n. 1
0
 private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (tabControl1.SelectedIndex == 0)
     {
         Loops newFrm = new Loops
         {
             MdiParent = this,
             // This set the form parent as the tabClicked
             Parent = tabControl1.TabPages[0]
         };
         newFrm.Show();
     }
     else if (tabControl1.SelectedIndex == 1)
     {
         Enumerables newFrm = new Enumerables
         {
             MdiParent = this,
             // This set the form parent as the tabClicked
             Parent = tabControl1.TabPages[1]
         };
         newFrm.Show();
     }
 }