CreateNoWindow with windows 98/ME

  • Thread starter Thread starter Sam Jost
  • Start date Start date
S

Sam Jost

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
 
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
 
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
 
Dang.
I'll be so so so very happy the day I won't have to support any W9x no
more. *sigh*

thanks, I thought it was just a minor glitch since it seems to work
from win32-api somehow.
Sam
 
Back
Top