Nate Bross Posted March 10, 2006 Posted March 10, 2006 I know I have seen several threads about this. Working on a program, I needed to achieve the same functionality so I hacked this little example together; I'm sure there's a better way but this works pretty well. System.Diagnostics.Process.Start("C:\\Documents and Settings\\Administrator\\My Documents\\Visual Studio 2005\\Projects\\eBay Search\\EbaySearch.exe") 'while external program is running While bSkipDBCheck = True 'set program running to false (so we don't loop endlessly) bSkipDBCheck = False 'for each process running For Each x As System.Diagnostics.Process In System.Diagnostics.Process.GetProcesses() 'check current process If x.ProcessName.ToString() = "EbaySearch" Then 'its the one we want to let finish so make sure we stay in the do loop bSkipDBCheck = True End If Next 'don't freeze the computer Application.DoEvents() End While 'Code to run after the external program has completed I'll post a C# conversion sometime later on. Quote ~Nate� ___________________________________________ Please use the [vb]/[cs] tags on posted code. Please post solutions you find somewhere else. Follow me on Twitter here.
Administrators PlausiblyDamp Posted March 10, 2006 Administrators Posted March 10, 2006 You could just use the .WaitforExit method after calling .Start() for an easier way. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Nate Bross Posted March 16, 2006 Author Posted March 16, 2006 HaHa. I have since found that and forgot to post it. Quote ~Nate� ___________________________________________ Please use the [vb]/[cs] tags on posted code. Please post solutions you find somewhere else. Follow me on Twitter here.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.