>Hi,
>Then, how can I control the dos program run finish and return back to calling point and continue other
>processing ?
>
>Regards,
>Derek
You can let the dos program create a file, and check for that file. Or if you can try this code, which I have copied from one of my own programs. The program returns .T. as long as the named program runs. You can create a loop or a timer and check when it will return .F.
Lparameters tcProgram
Local loShell As [Shell.Application]
Local lcProgram, llAlredyup, loIE, loShellWindows, lox
m.loShell = Createobject([Shell.Application])
m.lcProgram = Upper(m.tcProgram)
m.loShellWindows = m.loShell.Windows
For Each m.loIE In m.loShellWindows
If m.lcProgram == Justfname(Upper(m.loIE.FullName))
m.lox = m.loIE
m.llAlredyup = .T.
Exit
Endif
Endfor
Return m.llAlredyup