M
Morten Wennevik
My application has a sysTrayIcon loaded on startup with Icon1.ico
(Embedded resource).
When I pause this application I want sysTrayIcon to show this by swapping
the icon with a greyed out version, but I don't know how to get the
object, or if the object is embedded at all.
At load time I obtain "Icon1.ico" this way:
this.sysTrayIcon.Icon =
((System.Drawing.Icon)(resources.GetObject("sysTrayIcon.Icon")));
but trying either
this.sysTrayIcon.Icon =
((System.Drawing.Icon)(resources.GetObject("Icon2.ico")));
this.sysTrayIcon.Icon =
((System.Drawing.Icon)(resources.GetObject("Icon1.ico")));
fail to load an Icon.
Any idea how to solve this?
(Embedded resource).
When I pause this application I want sysTrayIcon to show this by swapping
the icon with a greyed out version, but I don't know how to get the
object, or if the object is embedded at all.
At load time I obtain "Icon1.ico" this way:
this.sysTrayIcon.Icon =
((System.Drawing.Icon)(resources.GetObject("sysTrayIcon.Icon")));
but trying either
this.sysTrayIcon.Icon =
((System.Drawing.Icon)(resources.GetObject("Icon2.ico")));
this.sysTrayIcon.Icon =
((System.Drawing.Icon)(resources.GetObject("Icon1.ico")));
fail to load an Icon.
Any idea how to solve this?