//If click on specific Menu Strip item then show that clicked form and hide this one. private void toolStripMenuItem1_Click(object sender, EventArgs e) { this.Hide(); admin_main am = new admin_main(); am.Show(); }
//Admin Login authenticator private void button2_Click(object sender, EventArgs e) { //if username and password is "admin", then it logins as admin if (textBox3.Text == "admin" && textBox4.Text == "admin") { MessageBox.Show("Login Successful."); this.Hide(); admin_main mn = new admin_main(); mn.Show(); } else { MessageBox.Show("Error! Please Check your Username or Password."); } }