Here is another way Grey....
Set the buffer at the Desktop Buffer and get the MouseX and MouseY. Get the X,Y, width and height of your window then just check if the mouse is within the window area (on the desktop). It works for me.
Set the buffer at the Desktop Buffer and get the MouseX and MouseY. Get the X,Y, width and height of your window then just check if the mouse is within the window area (on the desktop). It works for me.