Welcome to the forums.
The first thing you need to do is to set the EnableRaisingEvents property to True.
Then add a handler for the Exited event:VB.NET Code:
myProcess.EnableRaisingEvents = True
VB.NET Code:
AddHandler myProcess.Exited, AddressOf ProcessExited
And of course, you need an eventhandler subroutine:
VB.NET Code:
Private Sub ProcessExited(ByVal sender As Object, ByVal e As System.EventArgs) End Sub
Just add your logic in the ProcessExited method. Voila![]()




Reply With Quote