Well, when you do this:
Form2 f2 = new Form2();
f2.Show();
Form1 f1 = new Form1();
f1.Hide();
you're creating two new forms, showing one and hiding the other. Don't you want to hide the form that's already shown instead of hiding a new one that you just created? I think you meant
this.Hide()
instead of making a new
Form1
.
Also, see
this[
^] answer that I posted to a very similar question. It describes in vague terms a better solution for creating and showing a login form.