第1个回答 2009-07-12
我把2楼的改改!
'加一个text1
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If X < Text1.Left Or X > Text1.Left + Text1.Width Or Y < Text1.Top Or Y > Text1.Top + Text1.Height Then
If Text1 = "" Then
Text1 = ""
Else
MsgBox "离开"
Text1 = ""
End If
End If
End Sub
第2个回答 2009-07-12
Text1_LostFocus
''点击form的时候没反应
因为点击form的时候焦点没有变化
第3个回答 2009-07-11
Private sub Text1_LostFocus()
if text1.text<>text3.text then
msgbox"错误"
end if
end sub
第4个回答 2009-07-10
楼上的都没什么用
看 我 的
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If X < Text1.Left Or X > Text1.Left + Text1.Width Or Y < Text1.Top Or Y > Text1.Top + Text1.Height Then
MsgBox "离开"
End If
End Sub本回答被网友采纳
第5个回答 2020-05-16
private
sub
form_activate()
text2.setfocus
end
sub
widebright
-
江湖少侠
七级同志,你能在form-load
事件中,给
textbox调用setfocus方法?你试过了么?你能确定不报错?