問題描述
應用啟動後更改應用圖標 (Change application icon after app launched)
Is there any way to change the icon of an application after it is launched? I want to change the icon to reflect a notification.
Thank you
edit: Wpf solution based on Fredrik Mörks answer.
Uri iconUri = new Uri("icon1.ico", UriKind.RelativeOrAbsolute);
this.Icon = BitmapFrame.Create(iconUri);
參考解法
方法 1:
You can change the icon of the main form:
this.Icon = new Icon(@"<path to icon on disk");
(by Artur Carvalho、Fredrik Mörk)