control windows 7 taskbar grouping for my application

送分小仙女□ 提交于 2019-11-30 15:30:04

Application User Model IDs says:

"If different windows owned by one process require different AppUserModelIDs to control taskbar grouping, use SHGetPropertyStoreForWindow to retrieve the window's property store and set the AppUserModelID as a window property."

I solved it by using the Windows API Code Pack for .NET and the following code:

TaskbarManager.Instance.SetApplicationIdForSpecificWindow(window, guid);

Window assigned with the same id will be grouped together - windows with a unique id will have a separate taskbar icon.

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