private void button1_Click(object sender, EventArgs e) { if (this.textBox1.Text == "asma" && this.textBox2.Text == "asma1") { Form7 f7 = new Form7(); f7.Show(); this.Hide(); } else { MessageBox.Show("incorrect id or passsword"); } }