Is there an easy way to detect when the mouse is not over a window. I what a "mouse over" type behaviour for my window, but I need to know when to "turn off" the mouse over effects when the mouse leaves my window.
---------------------------------------------------------
Option Explicit
Private Type POINTAPI
x As Long
y As Long
End Type
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Sub Timer1_Timer()
Dim z As POINTAPI
GetCursorPos z 'Get Co-ordinets
If z.x < Left / Screen.TwipsPerPixelX Or z.x > (Left + Width) / Screen.TwipsPerPixelX Or _
z.y < Top / Screen.TwipsPerPixelY Or z.y > (Top + Height) / Screen.TwipsPerPixelY Then MsgBox "out"
End Sub
----------------------------------------------------------
Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.