2
Control nextControl;
if (e.KeyCode == Keys.Enter)
{
nextControl = GetNextControl(ActiveControl, !e.Shift);
if (nextControl == null)
{
nextControl = GetNextControl(null, true);
}
nextControl.Focus();
e.SuppressKeyPress = true;
}
我有這樣的代碼充當進入鍵,TAB,但是當我按下回車鍵則選擇文本框的值作爲圖像如何避免按Enter鍵時選擇文本框的值?
光標焦點在文本框的值開始。它可以在文本框值的末尾? – Vampire
@吸血鬼當然,編輯了樣本。只要告訴它在字符串的末尾選擇0個字符 –
謝謝,這是工作 – Vampire