更新时间:2023-12-03 08:32:34
TextBox还有一个 AcceptsTab
属性,当 Multiline = True
。
The TextBox also has an AcceptsTab
property that works when Multiline = True
.
有了这些条件,您现在可以看到是否按Tab键:
With those conditions, you can now see if the tab key was pressed:
Private Sub TextBox1_KeyDown(sender As Object, e As KeyEventArgs) _
Handles TextBox1.KeyDown
If e.KeyCode = Keys.Tab Then
e.SuppressKeyPress = True
'do something
End If
End Sub