Quote Originally Posted by jmcilhinney View Post
That is horrible code I'm afraid. What you have there is called a "busy wait" loop and it's one of the worst possible things you can create in code. That Do loop is going to be soaking up processor cycles continually, even though the application is not doing anything useful. What you should be doing is keeping a reference to the Process object returned by Process.Start and handling its Exited event. That way your app does exactly nothing the whole time the other application is running and then receives notification only when that app exits. It's like the difference between you staying up all night watching your clock so that you know when it's time to get up and just going to sleep and letting your alarm wake you up when it's time.
Yes, I had guessed it was horrible code. I'm still pretty new to vb.net. Thanks for the solution, I was not really sure if this could even be done in the way you described.