C:\VFP9\vfp9.exe" -t -cC:\VFP\Silent.fpw "DeleteFileOnReboot.prg
So, each PRG launches a copy of VFP9. I don't see how the API could help me, unless I was launching each of the PRGS from a master VFP9 application. Right?STORE ADLLS(dllArray) TO lnNumDLLs IF ASCAN(dllArray,"GetActiveWindow") = 0 DECLARE INTEGER GetActiveWindow IN User32 INTEGER ENDIF IF ASCAN(dllArray,"SetForegroundWindow") = 0 DECLARE INTEGER SetForegroundWindow IN User32 INTEGER ENDIF *--Get the current calling program's window IF TYPE('gnMainFoxWin') <> "N" .or. gnMainFoxWin = 0 gnMainFoxWin=GetActiveWindow() ENDIF *--Run your prg that shifts focus *--Note you might need a doevents after or a method of waiting for the focus *--to shift so you can bring it back (don't call setforegroundwindow too *--soon) *--Experiment with a DOEVENTS FORCE force here if you run into problems *--but try it first without it *--Bring focus back to the calling program IF TYPE('gnFoxMainWin') = "N" AND gnFoxMainWin <> 0 =SetForegroundWindow(gnMainFoxWin) ENDIF DOEVENTS FORCE