How to set the Taskbar Grouping Icon

只愿长相守 提交于 2019-11-27 18:26:19

问题


When my application opens too many windows the taskbar groups them into one button. Each window has its own icon, but the grouping icon is the default "unknown"-kind icon.

How can I set the grouping icon?


回答1:


This comment from Raymond Chen indicates that the icon is coming from the exe itself, I would suggest using something like eXeScope to make sure that your application icon is being embedded properly, and maybe compare it with other exes that display proper behavior to do delta debugging.




回答2:


The taskbar group icon can be set in the registry on a per application basis.

For explorer, this would be here:

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Applications\explorer.exe]
"TaskbarGroupIcon"="C:\Windows\Explorer.exe,13"



回答3:


Application taskbar group icon can be set in two ways

  1. Through Project Properties:

    Click Project in solution explorer → right click → select properties → select Application tab → go to resoruces and change the default icon and select the newicon and save and build.

  2. Through Registry(Dynamic):

    You have to create TaskbarGroupIcon key and value is "icon file with path" under "HKEY_CURRENT_USER\SOFTWARE\Classes\Applications\<>" If above keys are not present you have to create

    RegistryKey RegKey = Registry.CurrentUser.OpenSubKey(
       "Software\\Classes\\Applications\temp.exe",true); 
    RegKey.SetValue("TaskbarGroupIcon", "c:\temp.ico", RegistryValueKind.String);
    


来源:https://stackoverflow.com/questions/219096/how-to-set-the-taskbar-grouping-icon

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!