Closing a DOS window (1 Viewer)

ayjayh

Registered User.
Local time
Today, 03:12
Joined
Mar 29, 2002
Messages
20
Hi all
I have a button on my Form which On Click runs an Event Procedure which among other things has a "Call Shell" instruction to run PKpak.
PKpak is a DOS program and runs in a DOS window. PKpak then zips up several tables which have just been exported as dbase3 files.
(I am using PKpak so I can transfer the files to another computer which runs in DOS mode and can unzip the files using PKunpak for use with dbase3).
All works fine except that I have to manually close the DOS window when PKpak has finished. This is no big deal really but is not very elegant is it?
Is there an instruction I can add to automatically close the DOS window?
Thanks
Tony
:(
 

rich.barry

Registered User.
Local time
Today, 03:12
Joined
Aug 19, 2001
Messages
176
There's a cunning way around most things...here's a starting suggestion.

Make a batch file called say PKANEXIT.BAT which contains the text

PKPak whatever your Shell Call said
EXIT

Make your VB Code say Shell "C:\PKANEXIT.BAT"
 

ayjayh

Registered User.
Local time
Today, 03:12
Joined
Mar 29, 2002
Messages
20
:) Thanks Rich,
That worked fine after I figured out setting the program properties to "close on exit"
 

Users who are viewing this thread

Top Bottom