Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use of Shell function for DOS window

Status
Not open for further replies.

ddelk

Programmer
May 28, 2003
47
US
I am forced to use DOS to run dbase IV programs. ( It's a legacy thing). I am using the Shell function to open a DOS command window, and then executing the dbase program. I then want to wait for the DOS window to close before executing more VB code. I cannot seem to find a way to make VB wait until the DOS window closes before continuing its execution. I know by default that Shell is asynchronous but I can't find a way to override this default setting. I thought that the dos window would have the focus and I could make my VB code wait until focus was returned to it. But it seems that it doesnt recognize the DOS window as having the focus and it just keeps going. I am not using forms, I am executing all this directly from code and would like to keep it that way. Any help? Thanks.
 
Do a search in this forum (which is now available again) for ShellAndWait or see my post in thread222-951760
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top