简体   繁体   中英

How to change the icon of a C# WinForms exe, in TaskManager

I've already set the icon in the Project Properties, and the FormControl Icon. I've thus got my icon ( .ico file) in:

  • The TaskBar.
  • The TaskTray.
  • The top-left of the Form.
  • In Windows Explorer, if I navigate to the exe on disk.

But I've still got the default icon in TaskManager:

在此处输入图片说明

How do I fix that, in my C# WinForm? (ie make the icon in the red circle look unique, like VS, Excel, Firefox, etc. all do)

(There are a few answers that appear to address this in C++, but nothing in C#-land, or WinForms.)

Dammit. It turns out the answer is "close and re-open TaskManager". It must have cached the icon.

Restarting the exe didn't help, but restarting TaskManager sorted it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM