all groups > vj# > april 2004 >
You're in the

vj#

group:

How do I force a console application to be minimized upon launch?


How do I force a console application to be minimized upon launch? Console guy
4/28/2004 11:11:03 PM
vj#:
How do I force a console application to be minimized upon launch?
I have an application which starts a J# console applicatio
I can't seem to find the compiler options to allow this to be minimized. Any help
Thanks
Re: How do I force a console application to be minimized upon launch? Lars-Inge Tønnessen
4/29/2004 1:24:06 PM

[quoted text, click to view]

In the app that starts the console application:

System.Diagnostics.ProcessStartInfo processinfo = new
System.Diagnostics.ProcessStartInfo();
processinfo.set_FileName( "notepad.exe" );
processinfo.set_WindowStyle(
System.Diagnostics.ProcessWindowStyle.Minimized );
System.Diagnostics.Process process = System.Diagnostics.Process.Start(
processinfo );
// process.WaitForExit();

This will start the notepad text editor minimized. If you comment in the
last line, it will hang until notepad is closed by the user.


Regards,
Lars-Inge Tønnessen
www.larsinge.com

AddThis Social Bookmark Button