Ejemplo n.º 1
0
        } // PW 텍박 벗어날 시

        private void PW_txt_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                Login_btn.PerformClick();
            }
        }
Ejemplo n.º 2
0
 private void Password_txtbx_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == (char)13)
     {
         Login_btn.PerformClick();
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="msg"></param>
        /// <param name="keyData"></param>
        /// <returns></returns>
        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            if (keyData == (Keys.Enter))
            {
                if (this.ActiveControl == LoginName_txt)
                {
                    Password_txt.Focus();
                    return(true);
                }
                else if (this.ActiveControl == Password_txt)
                {
                    Login_btn.PerformClick();
                    return(true);
                }
            }

            return(base.ProcessCmdKey(ref msg, keyData));
        }