Exemple #1
0
 private void txtPassword_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == (char)13)
     {
         LoginB.PerformClick();
     }
 }
Exemple #2
0
        //private void newUserToolStripMenuItem_Click(object sender, EventArgs e)
        //{
        //    NewUserForm NUForm = new NewUserForm();
        //    NUForm.Show();
        //    this.Hide();
        //}

        //private void changePasswordToolStripMenuItem_Click(object sender, EventArgs e)
        //{
        //    ChangePassword CPForm = new ChangePassword(UsernameCB.SelectedItem.ToString());
        //    CPForm.Show();
        //    this.Hide();
        //}

        private void LoginForm_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.F5)
            {
                LoginB.PerformClick();
            }
            if (e.KeyCode == Keys.F6)
            {
                ExitB.PerformClick();
            }
        }