mouse cursor over form

Zexor

Well-known member
Joined
Nov 28, 2008
Messages
520
Programming Experience
3-5
I have a timer that check if the mouse is still over the form area if not then it does something. Right now it still say the mouse is over the form if another app is in between the mouse and the form. How do i exclude this condition so if something is in between, it consider not over the form?
 
Does it matter if form is active? If so you can use the Activated/Deactivate events, this also means ContainsFocus property is True. If not you have to resort to fairly complicated native code to check other windows z-order and intersection with your window area.
 
Back
Top