Run console application minimized?

D

Derrick

Is there anywhere I can set a CSharp console application to run minimized?
Class attribute maybe? I looked thru the project properties and didn't see
anything.

Thanks in advance!

Derrick
 
N

Nicholas Paldino [.NET/C# MVP]

Derrick,

I don't know that you can do that, at least, that you can minmize the
console window. Do you still want it to show up in the task bar or no?
 
?

=?ISO-8859-1?Q?=22Anders_Nor=E5s_=5BMCAD=5D=22?=

Derrick said:
Is there anywhere I can set a CSharp console application to run minimized?
Class attribute maybe? I looked thru the project properties and didn't see
anything.
There are no such properties or attributes for any application types.
However, you can write an application which starts another application
without a visible window. The following code snippet does this:

System.Diagnostics.ProcessStartInfo process= new
System.Diagnostics.ProcessStartInfo(@"MyApplication.exe");
process.WindowStyle=System.Diagnostics.ProcessWindowStyle.Hidden;
process.UseShellExecute=false;
System.Diagnostics.Process.Start(process);

Anders Norås
http://dotnetjunkies.com/weblog/anoras/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top