Ok so Solution 1 is for Asp.net and as I understand it this is a Windows Form App. So in that case the easiest way to do this is to just pass a reference from form1 to form 2 like so:
In form1:
private void button1_Click(object sender, EventArgs e)
{
Form2 a = new Form2(this);
a.Show();
this.Hide();
}
and in form2:
public partial class Form2 : Form
{
Form1 mainForm;
public Form2(Form1 mainForm)
{
InitializeComponent();
this.mainForm = mainForm;
}
private void button1_Click(object sender, EventArgs e)
{
mainForm.Show();
this.Hide();
}
}
Also one more thing in Form2 calling this.Hide(); the form will still exist in memory it will only be hidden from the user if this is what you intended that that is fine. However if you want to dispose of the form2 call this.Close() instead.