change windowstyle of a running process

Aug 16 2007 12:28 PM
hi im tryin to change a window style of a currently running process

basically i start a whole bunch of small exe's written in c++ and when i initially run them hidden like below

Process line = new Process();
line.StartInfo.FileName = Application.StartupPath + "\\file.exe";
line.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
line.Start();

but later on i wanna check whats happening in that exe and would like to change to windowstyle to
ProcessWindowStyle.Normal;

how can i do that ? i can save the process ID or handle to file for later reference.

Answers (6)