标签:
textbox的值为空或没有更改时,按下回车键textbox会失去焦点
此时用textbox1.setfocus不能使textbox1重新获取焦点
Private Sub Textbox1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbkeyreturn Then
KeyCode = 0
Textbox1.setfocus
End If
End Sub
标签:
原文地址:http://www.cnblogs.com/lbnnbs/p/4785019.html