View Full Version : Need to delay execution


fmm
06-01-2001, 08:45 AM
Is there a way to pause VB execution while an external program runs?

My code does some stuff, runs a Visual FoxPro executable, and does more stuff with the result.

I want VB to stop until VFP is done. I can use a message box that instructs the user to push a button when VFP is finished, but this is clunky.

Also, I can't pause VB for a set amount of time, since the VFP process running time is variable.

Any ideas?


fmm

AlanS
06-01-2001, 11:54 AM
You don't mention how the "result" from the Visual FoxPro application becomes available to the VB application, but that may point to the solution. After the VB app. launches the FoxPro app., it can simply loop until the results become available. Availability could be signaled by the presence of a particular disk file, a text box being populated (via DDE command from FoxPro), or otherwise. Hope this helps.

Mike Gurman
06-04-2001, 04:38 AM
Can you get Visual FoxPro to manipulate filenames on your local hard drive?

if the answer is yes, then it's just a case of getting the FoxPro bit to copy a text file (that you have previously put in place) called, say 'Flag.txt' to 'Done.txt' and make Access wait until it can see 'done.txt' before continuing, like this:

While Dir ("c:\Wherever\done.txt") =""
Wend

What does the Foxpro routine do? - is it something that Access could handle?

fmm
06-04-2001, 06:25 AM
Alan & Mike:

Thanks for the advice. I'm going to try Mike's approach.

I'm pretty sure that Access could handle the taks I'm doing in FoxPro, but I don't speak VB well enoufh (yet) to acomplish what I need done.


fmm