Click to See Complete Forum and Search --> : Running Application In Another Process Without Showing Console Window


yccheok
December 9th, 2002, 10:56 PM
i try to run an console application through a programmatically created process. i dont want a new console command window to pop up during the process running. hence, i use the following code.

------
System.Diagnostics.ProcessStartInfo pi = new System.Diagnostics.ProcessStartInfo(Application.StartupPath+"\\EncodeFile.exe");
pi.CreateNoWindow = true;
p = new System.Diagnostics.Process();
p.StartInfo = pi;
p.Start();
------

however, the console command window still show up although i oledi set
pi.CreateNoWindow = true;

can anyone tell me the solution?

thank you.

regards
yccheok

Holiday
May 21st, 2003, 07:44 AM
Try
System.Diagnostics.ProcessStartInfo property
ProcessStartInfo.WindowStyle = ProcessWindowStyle.Hidden;

pareshgh
May 21st, 2003, 12:00 PM
check the attached sample

Holiday
May 21st, 2003, 05:55 PM
Hi pareshgh,

is there any dependence on

stInfo.CreateNoWindow = true;
and
stInfo.WindowStyle = ProcessWindowStyle.Hidden;

:confused: