SetConsoleIcon (kernel32)
Last changed: -89.254.234.146

.
Summary
Sets the console icon.

C# Signature:

[DllImport("kernel32.dll", SetLastError=true)]
static extern bool SetConsoleIcon(IntPtr hIcon);

VB Signature:

Declare Function SetConsoleIcon Lib "kernel32.dll" (ByVal hIcon As IntPtr) As Boolean

User-Defined Types:

None.

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

http://support.microsoft.com/kb/124103 describes how to get handle of console window.

Tips & Tricks:

Please add some!

Sample Code:

    public static void SetConsoleIcon(Icon ico)
    {
      SetConsoleIcon(ico.Handle);
    }

Documentation