Reputation: 13
This is what I have so far:
if (label1.Text == "On")
{
notifyIcon1.Icon = Image.FromFile("@C:\Users\Alex\Downloads\On.ico");
}
What do I do make the icon equal to change it?
Upvotes: 1
Views: 529
Reputation: 3258
This should work: Aside from the obvious, I put the @ before the quotes. It may not matter, just the way I do it.
notifyIcon1.Icon = System.Drawing.Icon.ExtractAssociatedIcon(@"C:\Users\Alex\Downloads\On.ico");
You this helps you!
Upvotes: 2