winforms - How can I make a notifyicon in C# alternate between two icons? -


im using vs2010 c# , winform. when condition met, notifyicon in c# alternate between 2 icons. see code below created single icon can't see how programmatically change it. "((system.drawing.icon)(resources.getobject("notifyicon.icon")))" part doesn't make sense me.

notifyicon.icon = ((system.drawing.icon)(resources.getobject("notifyicon.icon"))); 

i tried...

notifyicon.icon = (system.drawing.icon(application.startuppath + @"\noneed.ico")); 

but wont work. error "system.drawing.icon' 'type', not valid in given context"

thanks help

you forget add new keyword:

notifyicon.icon = new system.drawing.icon( application.startuppath + @"\noneed.ico" ); 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -