ITaskbarList (shell32)
Last changed: -112.119.197.62

.
Summary
Exposes methods that control the taskbar. It allows you to dynamically add, remove, and activate items on the taskbar.

C# Signature:

[ComImport,
Guid("56fdf342-fd6d-11d0-958a-006097c9a090"),
InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface ITaskbarList
{
     /// <summary>
     /// Initializes the taskbar list object. This method must be called before any other ITaskbarList methods can be called.
     /// </summary>
     void HrInit();

     /// <summary>
     /// Adds an item to the taskbar.
     /// </summary>
     /// <param name="hWnd">A handle to the window to be added to the taskbar.</param>
     void AddTab([In] IntPtr hWnd);

     /// <summary>
     /// Deletes an item from the taskbar.
     /// </summary>
     /// <param name="hWnd">A handle to the window to be deleted from the taskbar.</param>
     void DeleteTab([In] IntPtr hWnd);

     /// <summary>
     /// Activates an item on the taskbar. The window is not actually activated; the window's item on the taskbar is merely displayed as active.
     /// </summary>
     /// <param name="hWnd">A handle to the window on the taskbar to be displayed as active.</param>
     void ActivateTab([In] IntPtr hWnd);

     /// <summary>
     /// Marks a taskbar item as active but does not visually activate it.
     /// </summary>
     /// <param name="hWnd">A handle to the window to be marked as active.</param>
     void SetActiveAlt([In] IntPtr hWnd);
}

[ComImport]
[Guid("56fdf344-fd6d-11d0-958a-006097c9a090")]
public class CoTaskbarList
{
}

VB Signature:

Declare Function ITaskbarList Lib "shell32.dll" (TODO) As TODO

User-Defined Types:

None.

Alternative Managed API:

http://code.msdn.microsoft.com/WindowsAPICodePack

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

IntPtr windowHandle = ...;
var taskbarList = (ITaskbarList) new CoTaskbarList();
taskbarList.HrInit();
taskbarList.DeleteTab(windowHandle);

Documentation

http://msdn.microsoft.com/en-us/library/bb774652(VS.85).aspx