PS: I didn't try this on Win95/98/Me,but it works fine on my XP box:
[DllImport("USER32.DLL", SetLastError=true)]
private static extern bool ShowWindow(IntPtr hWnd, int cmdShow );
private const int SW_HIDE = 0x0000;
public static void Main()
{
Process p = Process.Start("cmd");
ShowWindow(p.MainWindowHandle, SW_HIDE);
}
Niki
"Niki Estner" <ni*********@cube.net> wrote in
news:OL**************@TK2MSFTNGP09.phx.gbl...
Quote from MSDN (Article "Process creation flags")
CREATE_NO_WINDOW:
The process is a console application that is run without a console window.
This flag is valid only when starting a console application.
This flag cannot be used with MS-DOS-based applications.
Windows Me/98/95: This value is not supported.
I don't think this "bug" will be fixed.
This flag simply isn't supported by Win95/98/Me.
Niki
"Sam Jost" <sa*****@web.de> wrote in
news:66**************************@posting.google.c om... is/will this be fixed? Or is it just a 'make Windows 98 as
unattractive as possible' feature we have to deal with? (just kiddin)
In case you don't know this bug:
when you try to create a console process with CreateNoWindows= true it
will work fine on windows NT/2k/xp but on windows 9x/ME the console
window will pop up anyway.
One might do fancy workarounds for this, enumerating all windows
searching for the console and hiding it, but be real, this is a ugly
nuisance!
Maybe anyone is knowing if .net 1.2/2.0 fixes this?
Sam