|
-
January 12th, 2000, 04:39 PM
#1
Not running finishing code until another program quits running.
ODes anyone know of a quick way to keep part of a vb program from running until another part is done.. Like for instance i want to run a Perl script from a VB program. but I don't want the rest of the VB program to run until after the Perl script is finished. I know of a way to do it but I don't want to put in all that extra code in unless I really really have to.. I know I can check to see what processes are running but I don't want to do that unless I have to.. any thoughts?
-
January 13th, 2000, 02:42 AM
#2
Re: Not running finishing code until another program quits running.
I'd use the following approach:
- start the Perlscript via CreateProcess API
- add a Timer object to a form
- at regular intervals call WaitForSingleObject to see if the Perlscript has ended.
- if the return code of Waitfor... indicates that the object is finished, call CloseHandle and do whatever you want after the perlscript is finished.
-
January 13th, 2000, 03:55 AM
#3
Re: Not running finishing code until another program quits running.
Here is a link
http://www.freevbcode.com/ShowCode.Asp?ID=99
I haven't tried it myself but i don't see any reason for it not to work.
-------------------------
Nick A.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|