?
Solved

Closing a Dos window

Posted on 1998-10-27
5
Medium Priority
?
124 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 12

Expert Comment

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

M

0
 

Author Comment

by:sear
ID: 1441845
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 40 total points
ID: 1441846
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
ID: 1441847
Thank you does exactly what I want.
0
 
LVL 12

Expert Comment

by:mark2150
ID: 1441848
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Suggested Courses
Course of the Month14 days, 20 hours left to enroll

771 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