7 replies
Are you trying to run another program from within a VB program? Is the other program cmdline-only or is it a Windows program?
There are many VB specific sites on the 'net. I have seen several articles on how to wait for another program to finish before continuing the current one. Do a little research.
Ralph
by ram_cv
There could be quite a few methods to achieve this goal:
1) In your C program create a predefined file at a predefined directory. This file should be created when the C program exits. In the VB program check for this file's existence in a loop and proceed further only when the file is created.
2) Use Windows messages. In your C program when you are finished and are going to end, send a Windows message to the VB program. The VB program should be doing a doEvents and waiting for this event.As soon as it recieves this event it should go ahead with its processing.
Also there are other methods of IPC like sockets which can be used for this purpose, but one the above two should be the most suitable for your purposes.
Cheers!
Ram
by ram_cv
by sygnosys
The best way to link C and VB, in my opinion, is through a DLL. Just pick up your C code and build a DLL from it!
But if you want to stick with an independent exe
you can use the shell function and simply state in the 3rd parameter true and this will make shell function sync with the execution of your exe.
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending