Beispiel #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (MyName.Text == "demo" && Password.Text == "demo")
     {
         new Form2().Show();
         this.Hide();
     }
     else
     {
         MessageBox.Show("The username or the password are incorrect");
         MyName.Clear();
         Password.Clear();
         MyName.Focus();
     }
 }
Beispiel #2
0
 private void label2_Click(object sender, EventArgs e)
 {
     MyName.Clear();
     Password.Clear();
 }