Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Halt app while external program runs
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00903008
Message ID:
00903056
Views:
29
Mel,

This works too:
function RunProcess( pcProgram, pcArguments, pnShowWindow, plModal )

local loShell, lnRetVal

if type('pcArguments') != 'C'
	pcArguments = ""
endif

loShell = createobject( "wscript.shell" )
lnRetVal = loShell.Run( pcProgram + " " + pcArguments, pnShowWindow, plModal )
return lnRetVal
if plModal is .t. it'll wait until the launched process finishes.

>I am calling an external Windows app (not a VFP app) from within the method of a Form using the RUN /N command. However, I need my VFP program to stop and not proceed until I call the other program, and it is done processing some information. The other program does present some dialogs which the user must enter some data into.
>
>Can someone tell me now to do this?
>
>Also, is there anyway I can stop my App from being selected while the other program is up and running?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform