Declare Integer CreateProcess In kernel32.Dll ; INTEGER lpApplicationName, ; STRING lpCommandLine, ; INTEGER lpProcessAttributes, ; INTEGER lpThreadAttributes, ; INTEGER bInheritHandles, ; INTEGER dwCreationFlags, ; INTEGER lpEnvironment, ; INTEGER lpCurrentDirectory, ; STRING @lpStartupInfo, ; STRING @lpProcessInformation Declare Integer WaitForSingleObject In kernel32.Dll ; INTEGER hHandle, Integer dwMilliseconds Declare Integer CloseHandle In kernel32.Dll ; INTEGER hObject Declare Integer GetLastError In kernel32.Dll Define WAIT_TIMEOUT 0x00000102 Define WAIT_INTERVAL 200 If WaitForSingleObject(hProcess, WAIT_INTERVAL) != WAIT_TIMEOUT && this always evaluates to True for vfp9.the last line should be false, unles the process has timed out. It says true, the first time thru for vfp 9, while in vfp8, it will hit true after the pdf is built.