Hide Form1, show Form2 on Form1_Load
<p>The Form1 of my App is a login page that i want to:<br>
- show on some conditions<br>
- hide and show Form2 on some conditions</p>

<p>I can hide/show a form by the button click event like so,</p>

<pre><code>    private void button1_Click(object sender, EventArgs e)
    {
        Form2 f2= new Form2();
        f2.Show();
        this.Hide();
    }
</code></pre>

<blockquote>
  <p>but the same technique does not work for Form1_Load.</p>
</blockquote>

<p>I have tried the first example in <a href="https://stackoverflow.com/questions/70272/single-form-hide-on-startup">this thread</a>, </p>

<p><strong>Program.cs</strong></p>

<pre><code>    static void Main()
    {
        Application.EnableVisualStyles();
        Application.SetCompatibleTextRenderingDefault(false);
        Application.Run();
    }
</code></pre>

<p><strong>Form1</strong>  </p>

<pre><code>    private void Form1_Load(object sender, EventArgs e)
    {

        Form2 f2= new Form2();
        f2.Show();
        this.Hide();
    }
</code></pre>

<p>but it's not showing neither Form1 or Form2, and i don't see how it could. The second example i can't understand how i can implement, and the next google results are even more confusing.<br>
Please help i'm stuck on this for 2 hours.</p>