>Can anyone please help with this.
>
>I am using api_apirun from with VFP 6.00.
>FOR EXAMPLE : I call notepad.exe.
>The problem is when I exit notepad, I still get the wait window
>"still Running".
>
>Is there a way to get rid of the wait window after I have
>exited notepad without pressing Enter.
>
Can you show the code you're using to run this that causes a problem? There's no WAIT WINDOW in the class; if you're using the example code as a basis for getting it to work, there's no need for it. The following will run notepad; the first runs and returns immediately to VFP, the second does not return to VFP until it finishes:
SET CLASSLIB TO PROCESS
oProc = CREATEOBJ('API_APPRUN','NOTEPAD.EXE MyFile.TXT')
oProc.LaunchApp()
* Notepad is running independent of VFP; you can check it's state with
* oProc.CheckProcessExitCode(); it's done when you get a value other than 259
oProc2 = CREATEOBJ('API_APPRUN','NOTEPAD.EXE OtherFile.TXT')
oProc2.LaunchAppAndWait()
* Control will not return to VFP until the second instance of Notepad
* is closed (it doesn't matter what happened to the first) or until
* you've pressed the < Esc > key with VFP as the active process.