Hi Jeff,
Here's the piece of code I use to wait for a window to open. It wouldn't be hard to modify it to wait for window to close. The first parameter tnWindClass is usualy 0 if you are not looking for specific class of windows.
DECLARE Long FindWindow IN WIN32API STRING @lpClassName, STRING lpWindowName
DECLARE Sleep IN WIN32API Long
PROCEDURE WaitForWindow(tnWindClass, tcWindTitle, tnWait4Wind)
LOCAL lnStartSeconds
Sleep(.5 * 1000)
lnStartSeconds = SECONDS()
DO WHILE FindWindow(tnWindClass, tcWindTitle) <= 32 ;
AND (SECONDS()-lnStartSeconds < tnWait4Wind)
DOEVENTS
Sleep(.5 * 1000)
ENDDO
RETURN FindWindow(tnWindClass, tcWindTitle)
>Hi,
>
>I have a Fox (6.0) application which calls another piece of software by using the standard RUN command. I need to halt the code until this external software has closed itself down, therefore I want to place a timer on my form to check intermitantly for the existence of the software.
>
>Is there a standard API method for checking for existence of an open window external to Fox? All I think I need is to find a function where I can pass the window name and have its file handle returned, or 0/-1 etc. if not found.
>
>Any help appreciated as always.
>
>Regards
>
>Jeff
--sb--