Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Program close

Status
Not open for further replies.

grampalew

Programmer
Mar 3, 2001
2
US
I am writing a "menuing" program that uses the "shell" command to launch apps. I want to know what the latest technique is for determining when the app is exited. I used to be able to do this by launching to app via a batch file that erased a blank file when the program terminated and then using the Dir$ function to test for the file. In the latest versions of Windows, this no longer works. The batch file no longer waits for the program to exit before executing the next line. I'm using VB5.

Thanks
 
Check If File Exist

'Insert the following code to your form:

Private Sub Form_Load()
'Replace the 'c:\autoexec.bat' with then name of the file (with his path) that
'you want to check his existence
If Dir$(&quot;c:\autoexec.bat&quot;) <> &quot;&quot; Then
MsgBox (&quot;The file exist&quot;)
Else
MsgBox (&quot;The file does not exist&quot;)
End If
End Sub

Eric De Decker
vbg.be@vbgroup.nl

Licence And Copy Protection AxtiveX.

Download Demo version on my Site:
Promotions before 02/28/2001 (free source codebook),visite my site
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top