Exemplo n.º 1
0
 private void BT_LoginLogin_KeyDown(object sender, KeyEventArgs e)
 {
     BT_LoginLogin.PerformClick();
     e.SuppressKeyPress = true;
     e.Handled          = true;
     // Do the same when the cursor is in the textbox
 }
Exemplo n.º 2
0
 private void TB_LoginUsername_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode != Keys.Enter)
     {
         return;
     }
     BT_LoginLogin.PerformClick();
     e.SuppressKeyPress = true;
     e.Handled          = true;
     // Do the same when the cursor is in the textbox
 }
Exemplo n.º 3
0
        private void TB_LoginPassword_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode != Keys.Enter)
            {
                return;
            }
            BT_LoginLogin.PerformClick();
            // When enter is pressed, login button is pressed
            #region "Timer arguments"

            timer1.Start();
            toolStripStatusLabel1.Visible = true;
            toolStripStatusLabel1.Text    = "Loading";

            #endregion

            // time to stop the handling errors
            e.SuppressKeyPress = true;
            e.Handled          = true;
            // Handle all exceptions
        }