Solved

Closing a Dos window

Posted on 1998-10-27
5
117 Views
Last Modified: 2010-04-30
How can I close a dos window within Vb after it has quit running?
0
Comment
Question by:sear
  • 3
  • 2
5 Comments
 
LVL 12

Expert Comment

by:mark2150
Comment Utility
You need to set the properties of the program to "Close on Exit"...

M

0
 

Author Comment

by:sear
Comment Utility
I don't think this is the answer I'm looking for. I want to be able to run a program from vb such as
shell("c:\compress.exe setup.exe setup.ex_") and when the program is finished I want it to close automatically.
Jr.
0
 
LVL 12

Accepted Solution

by:
mark2150 earned 10 total points
Comment Utility
Right. Set the properties of C:\COMPRESS.EXE to "Close on exit" and it'll fold the tent when it's done.

M

0
 

Author Comment

by:sear
Comment Utility
Thank you does exactly what I want.
0
 
LVL 12

Expert Comment

by:mark2150
Comment Utility
If you set the property to "Run minimized" you'll not see a DOS window while it's flying either...

I have ExecCmd function code that *waits* for child to finish before letting your code continue. SHELL is a async process and parent continues to fly while child runs. Sometimes is good, sometimes is not if you need data that child will produce.

If you need ExecCmd source hit me direct at mark_lambert@ntsc.navy.mil

M

0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now