* waiting until the termination of the program DOEVENTS DO WHILE .T. exitcode = 0 && initialize return value to 0 = GetExitCodeProcess(hProcess, @exitcode) IF exitcode # 259 && not still busy EXIT && fall out of loop ENDIF = Sleep (100) && wait .1 seconds ENDDOshould be replacable by a
DECLARE INTEGER WaitForSingleObject IN kernel32.dll INTEGER, INTEGER lnRetVal = WaitForSingleObject(hThreadHandle,INFINITE)which sets the VFP process into an idle waitstate without using any processor resources until the other application finishes ..