Hi everybody,


Here's my problem :

I want to be able to show or hide a process window while it is running.

Here is my code :

Process p = null;

p = new Process();
p.StartInfo.WorkingDirectory = "c:\\Program Files\\Internet Explorer\\";
p.StartInfo.FileName = "iexplore.exe";

p.StartInfo.CreateNoWindow = true;
p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;

p.Start();
while (!p.HasExited)
{
Application.DoEvents();
if (showProcess)
{
// Which code here ??
}
Thread.Sleep(100);
}







void button_showOrHideProcess_click (...)
{
showProcess = !showProcess;
}




obviously process.startInfo has no effect when process is already running, so how can I make window visible ?