private void button1_Click(object sender, EventArgs e) { frmData dat = new frmData(); this.Hide(); dat.Show(); }
private void button2_Click(object sender, EventArgs e) { if ((textBox1.Text == "maryamnawaz" || textBox1.Text == "zainabwajid") && textBox2.Text == "admin12") { frmData dat = new frmData(); this.Hide(); dat.Show(); } else { MessageBox.Show("Invalid Login Attempt"); } }