delete可从KeyDown中获取。只有tab不同,它会激发LostFocus,以前做过的例子:http://community.csdn.net/Expert/topic/3440/3440539.xml?temp=.8043177 Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As IntegerPrivate Sub Text1_LostFocus() If GetKeyState(vbKeyTab) < 0 Then
' MsgBox "按下了“TAB”" '在这里添加代码 Text1.SetFocus 'SendKeys "{down}" End IfEnd Sub
Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As IntegerPrivate Sub Text1_LostFocus()
If GetKeyState(vbKeyTab) < 0 Then
' MsgBox "按下了“TAB”"
'在这里添加代码
Text1.SetFocus
'SendKeys "{down}"
End IfEnd Sub