Hide another app's taskbar button

后端 未结 2 1461
终归单人心
终归单人心 2020-12-30 04:52

I would like to be able to hide another application\'s window from the taskbar, without hiding the window itself. Specifically, I want to have several different Web browsers

相关标签:
2条回答
  • 2020-12-30 05:31

    From MSDN:

    Version 4.71 and later of Shell32.dll adds the capability to modify the contents of the taskbar. From an application, you can now add, remove, and activate taskbar buttons. Activating the item does not activate the window; it shows the item as pressed on the taskbar.

    The taskbar modification capabilities are implemented in a Component Object Model (COM) object (CLSID_TaskbarList) that exposes the ITaskbarList interface (IID_ITaskbarList). You must call the ITaskbarList::HrInit method to initialize the object. You can then use the methods of the ITaskbarList interface to modify the contents of the taskbar.

    It seems like COM interop is the way to go to reliably manipulate the contents of the taskbar. In particular, you would need to call the following functions:

    • ITaskbarList::AddTab
    • ITaskbarList::DeleteTab

    You can find the C# signature for the ITaskbarList interface at pinvoke.net: ITaskbarList.

    0 讨论(0)
  • 2020-12-30 05:39

    Have you tried removing WS_EX_APPWINDOW?

    0 讨论(0)
提交回复
热议问题