
How To? Closing Shelled DOS app when done
Keep things the way they are, but change the command line for the DOS app
adding "command.com /c" in front, ie:
x= Shell("\path\command.com /c " & DOSapp2start, 1)
This will start a copy of command com, and the /c tells it to close the
window when done.
You may want to use the environ$ method as well to assure the correct path
to command.com
--
Randy Birch, MVP Visual Basic
Moderator, Fidonet Visual Basic Programmer's Conference
VBnet, The Visual Basic Developers Resource Centre
http://home.sprynet.com/sprynet/rasanen/
: I have to shell out to a DOS app in the middle of my Win95 program. I
: am able to start the DOS program, and I am able to wait until the DOS
: program is finished. However, I do not know how to close the window
: that is created for the DOS app.
:
: Does anybody know the secret API call for this?
:
: I'm calling the DOS program with the normal VB SHELL command using
: vbminimized as the window state.
:
: I'm using the GetExitCodeProcess API function to determine when the
: app is done.
:
: Thanks
:
: Bob Smedley
:
: