Image鼠标离开事件
Image没有hwnd属性
有其他方法能判断在Image控件上实现鼠标离开事件吗? Image鼠标离开事件
[解决办法]
如果要求不是很严,思路是:你鼠标移出image可能进入另一个控件(如Form),
你可以尝试用 Image的mousemove 和 form的mousemove 结合来做
声明一个模块变量bImageMove,用来标明是否 在image中移动过
当然,你可以根据Timer时间来进一步精确做到这一点
Private bImageMove As Boolean
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
bImageMove = True
End Sub
Private Sub Image1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If bImageMove Then
Debug.Print "Image move out 事件" '这里写处理代码
End If
bImageMove = False
End Sub