>>Remember that Windows is a pre-emptive multi-tasking operating system. IOW, whether or not an application has focus, it still gets a time-slice of the processor and processing continues. If this is VFP 7.0, just past the _VFP.hWnd property to the same API function as in the other case. If pre-7.0, use either the FindWindow() API call passing the _SCREEN.Caption property to get the window handle or MainhWnd() from Foxtools.
>
>GetActiveWindow() does not accept any parameter. I tried:
>
>
>GetActiveWindow(_VFP.hWnd)
>
I was referring to SetActiveWindow() which does.
George
Ubi caritas et amor, deus ibi est