M
Miro
Are you sure that "wait 1000" needs to be there?
I pulled this example off the net.
====
Private Sub btnWaitForExit_Click( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles btnWaitForExit.Click
' create a new process
Dim myProcess As Process = _
System.Diagnostics.Process.Start("sample.txt")
' wait until it exits
myProcess.WaitForExit()
' display results
MessageBox.Show("Notepad was closed at: " & _
myProcess.ExitTime & "." & _
System.Environment.NewLine & "Exit Code: " & _
myProcess.ExitCode)
myProcess.Close()
End Sub
======
Miro
I pulled this example off the net.
====
Private Sub btnWaitForExit_Click( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles btnWaitForExit.Click
' create a new process
Dim myProcess As Process = _
System.Diagnostics.Process.Start("sample.txt")
' wait until it exits
myProcess.WaitForExit()
' display results
MessageBox.Show("Notepad was closed at: " & _
myProcess.ExitTime & "." & _
System.Environment.NewLine & "Exit Code: " & _
myProcess.ExitCode)
myProcess.Close()
End Sub
======
Miro