if (textBox1.Text == "admin" && textBox2.Text == "1234") { Form2 frm = new Form2(); frm.Show(); this.Hide(); } else { MessageBox.Show("Hata"); }