I have a c# win forms program and after I click a button it launches a windows application and then when I'm done, I want to close the app and return to my win form. When I close the launched app, my win form always seems to get pushed all the way to the back and I have to hunt for it. Any ideas?
var process1 = new System.Diagnostics.Process();
process1.EnableRaisingEvents = false;
var leftPath = @"c:\codereview\" + curDateTime + @"\left\";
var rightPath = @"c:\codereview\" + curDateTime + @"\right\";
var execPath = @"c:\program files\winmerge\winmergeu.exe";
var strCmdLine = "/C " + '"' + execPath + '"' + " /r " + leftPath + " " + rightPath;
System.Diagnostics.Process.Start("CMD.exe", strCmdLine);
process1.Close();