Process.Start()
p1 = new Process(); p1.EnableRaisingEvents = true; p1.Exited += new EventHandler(p1_Exited); p1.StartInfo.FileName = "iexplore.exe" /* or word.exe or excel.exe*/ p1.SynchronizingObject = getDataButton; p1.Start(); <br /> void p1_Exited(object sender, EventArgs e) { threadExited = true; }
p1_Exited
p1.Start()
// Wait for Exited event, but not more than 30 seconds. while (true) { Thread.Sleep(500); }
e.Handled = true;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)