I have a WinForms program that launches another program and then waits for it to exit before moving on. This launched program may run for an hour or so. After the user exits my form disappears from the screen AND the taskbar. When we opened the Task Manager it was still there and when we clicked the Switch To button it popped right back on the screen and continued on its way.
My question is: Is there a way to make sure the poor C# program doesn't disappear when control is returned from the OtherProgram.exe? It could be a best practice type thing as I've never used this sort of thing before. Thanks for any help!Code:System.Diagnostics.ProcessStartInfo p = new System.Diagnostics.ProcessStartInfo(@"C:\OtherProgram.exe") ; p.Arguments="-RunForever"; System.Diagnostics.Process proc = new System.Diagnostics.Process(); proc.StartInfo = p; proc.Start(); proc.WaitForExit(); this.button3.BackColor=Color.LightGreen; //success indicator



LinkBack URL
About LinkBacks




