title: Adding a tabPage to a separate Form
body: <p>I have 2 forms, one is labelled Form1.cs and it has a tabControl with 2 tabs in it as default. I have Form2.cs which has a label (Name:), a textbox and an "OK" button on it.</p>
  
  <p>I am looking to create a new tab on Form1.cs with the name at the top of the tab being whatever is typed into the textbox.</p>
  
  <p>I am very new to C# / Visual Studio and finding it hard to read up anything that might be able to assist me with this.</p>
  
  <p>Form1.cs and Form2.cs</p>
  
  <pre><code>namespace Scoreboard3
  {
      public partial class Form1 : Form
      {
          public Form1()
          {
              InitializeComponent();
          }
  
          private void scoreboard2pToolStripMenuItem_Click(object sender, EventArgs e)
          {
              Form2 f2 = new Form2();
              f2.ShowDialog();
          }
      }
  }
  </code></pre>
  
  <pre><code>namespace Scoreboard3
  {
      public partial class Form2 : Form
      {
          public string SelectedText { get; set; }
  
          public Form2()
          {
              InitializeComponent();
          }
  
          private void txtBox2v2_TextChanged(object sender, EventArgs e)
          {
  
          }
  
          public void OK_Click(object sender, EventArgs e)
          {
              Form1.TabControl1.TabPages.Add;
          }
      }
  }
  </code></pre>