Private Sub Text1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)Dim MouseLeave As BooleanMouseLeave = (0 <= X) And (X <= Text1.Width) And (0 <= Y) And (Y <= Text1.Height)If MouseLeave Then
Text1 = "Inside"
SetCapture Text1.hWndElse
Text1 = "Outside"
ReleaseCapture
End IfEnd Sub------------------
上面是一段判断Text1鼠标移出移入的程序,请问为什么SetCapture是mouseleave=(0 <= X) And (X <= Text1.Width) And (0 <= Y) And (Y <= Text1.Height)
之后,才开始调用的呢?不是应该设计SetCapture,捕捉文本框的鼠标移动,再进行判断的吗?
请指点!