>Peter,
>
>Just off the top of my head could you determine if the MouseDown is outside the form by using the Form Top, Left, Height, Width and the current mouse position in the screen. If you can then you could alter the forms Top, Left, Height, Width to give an invisible margin around the form.
>
The obvious way to do this is to save the hWnd of the Form, and use a timer to detect if the current foreground window has the same hWnd as the form to hide; you can use the template code for detecting when VFP is no longer in foreground that I posted in the FAQ.