Solved

Closing a Dos window

Posted on 1998-10-27
5
118 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
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 10 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Replace Formatted Numbers with text 9 61
VBA open file from excel cell 4 36
VB6 Compile Compatibility Issue 4 90
vb6 - Transfer from MSHFlexgrid1 to xls issue 8 47
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…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

920 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

12 Experts available now in Live!

Get 1:1 Help Now