我使用KeyPress
Event 来改变TextBox
. 在我使用选项之前它工作得很好AutoComplete
,之后它就不起作用了。
代码KeyPress
:
If Asc(e.KeyChar) = 13 Then
txtQuantity.Focus()
txtQuantity.SelectAll()
lastTxtBox = "name"
End If
代码TextBox
:
txtProductCode.AutoCompleteMode = AutoCompleteMode.Suggest
txtProductCode.AutoCompleteSource = AutoCompleteSource.CustomSource
我想同时使用这两个建议选项。我也尝试将按键更改为 keyDown ,但它仍然不起作用。有谁知道为什么?