Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am trying to start an hidden process in the background of my form application but it always shows visible no matter what. What am i doing wrong? :(

Process SomeProgram = new Process();
SomeProgram.StartInfo.FileName = @"C:\\program.exe";
SomeProgram.StartInfo.Arguments = "some args here";
SomeProgram.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
SomeProgram.StartInfo.UseShellExecute = false;
SomeProgram.StartInfo.RedirectStandardOutput = true;
SomeProgram.StartInfo.CreateNoWindow = true;
SomeProgram.Start();
Posted

Ok, here's an alternate technique you can use:

http://voidnish.wordpress.com/2004/08/09/running-your-apps-on-a-hidden-desktop/[^]

The idea is to start the app in a separate desktop, so whether it's visible or not does not matter.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 27-Apr-11 20:23pm    
Very interesting technique, well designed and described. (Practical value of it maybe questionable, but it does not matter.) My 5.

Nishant, it's a wonderful photograph on top of the reference page. Where did you get it?
--SA
It's likely that the program ignores the visibility flags and always makes itself visible.
 
Share this answer
 
Comments
cl0ud 27-Apr-11 18:36pm    
Thanks for your answer and that is possible, is there any other way to solve my problem?
Nish Nishant 27-Apr-11 18:36pm    
See my alternate answer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900