Please send me the code snippet. Thanks.
-Original Message-
From: Eric Gunnerson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 14, 2002 9:16 AM
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] Auto-Minimizing Console Apps
If you're doing something like this, I think it's cool to
If you're doing something like this, I think it's cool to put it in the
System Tray. If you create your app as a Windows Application, you can
set it up so it starts minimized, and/or use the NotifyIcon class to get
an icon in the system tray.
If you want it only in the system tray, Windows Forms
Boyd Campbell wrote:
> Is there a way in code (C#) for me to specify that my console applet run
> minimized?
The Win32 code would be:
ShowWindow( GetConsoleWindow(), SW_SHOWMINIMIZED );
Not sure if the console APIs are exposed in .NET or not... you might need to
P/Invoke to GetConsoleWindow
AFAIK, there is no way to do this directly. However, if you use the
process class to get the WindowHandle from the current process, and
Win32 ShowWindow command (through interop), you should be able to do it
with a few lines of code.
This is off the top of my head; I don't have VS.NET installed