vb用户在文本框中按回车时,自动下移到下一个文本框
来源:百度知道 编辑:UC知道 时间:2024/06/27 07:02:21
'1 先把Form窗体的KeyPreview设置为True
'2 窗体按键时
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then '回车键
SendKeys vbTab '模拟键盘发送TAB键
End If
End Sub
tab+1
UC知道是一部内容开放、自由的互动网络百科全书
客观、专业、权威的知识性百科全书
来源:百度知道 编辑:UC知道 时间:2024/06/27 07:02:21
'1 先把Form窗体的KeyPreview设置为True
'2 窗体按键时
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then '回车键
SendKeys vbTab '模拟键盘发送TAB键
End If
End Sub
tab+1