开发者

Winforms: How to change application taskbar icon programatically for Pinned App in Windows 7

开发者 https://www.devze.com 2023-02-16 19:01 出处:网络
I am changing the icon by开发者_如何学Go doing the following in the Main form: this.Icon = myIcon;

I am changing the icon by开发者_如何学Go doing the following in the Main form:

 this.Icon = myIcon; 

And this works fine in Windows 7 except when I "pin" the application to the taskbar, this seems to have no effect on the taskbar icon and only affects the top/left of the window icon.

How do I ensure that I can change the application taskbar icon as well in Windows 7 without having to use Windows 7 Icon overlays as that will just be overlaying another graphic on the icon but not changing the main icon?


Pinned app actually creates a windows shortcut. So to do this will have to manipulate a windows shortcut file on disk. Not a good idea as it seems hacky. Decided to use overlays instead.

0

精彩评论

暂无评论...
验证码 换一张
取 消