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
Post a Comment