private void btnMenu_Click(object sender, EventArgs e) { menu menu = new menu(); this.Close(); menu.Show(); }
private void button1_Click(object sender, EventArgs e) { if (textBox1.Text == "Admin" && textBox2.Text.ToString() == "123") { menu page2 = new menu(); page2.Show(); Hide(); } else { lblErrorText.Text = "Invalid username or password"; lblErrorText.ForeColor = Color.Red; } }