private void txtpwd_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == (char)13) this.btnok.Focus(); }