c# add tab to tabControl from separate form
<p>Ok, what I am trying to do is I have a form, MainForm, that has a TabControl and another form called newProject that I'm trying to create a new tab on the TabControl of the MainForm with.</p>

<p>This is the code on my newProject Form</p>

<pre><code>void wizard1_FinishButtonClick(object sender, CancelEventArgs e)
{
    MainForm mf = new MainForm();

    createTab();
    this.Hide();
}
void createTab()
{
    MainForm mf = new MainForm();
    string name = textBoxX1.Text;
    SuperTabItem tab = mf.ProjectTabControl.CreateTab(name);
}
</code></pre>

<p>and this is the code on my MainForm</p>

<pre><code>public SuperTabControl ProjectTabControl
{
    get
    {
        return projectTabControl;
    }
}
private void newProjectTab_Click(object sender, EventArgs e)
{
    newproject.Show();
}
public void AddTab()
{
    string s = "New File " + NewTab++;

    this.ProjectTabControl.Tabs.Add(new BPSTabItem(s));

    textEditor();
}
</code></pre>

<p>I have no clue why it is not working, so any help would be appreciated,</p>

<p>thank you in advanced,
   Kyle</p>
