title: How can I make a notifyicon in C# alternate between two icons?
body: <p>Im using VS2010 with C# and a WinForm. When a certain condition is met, I would like the notifyicon in C# alternate between two icons. I see that the code below is created for a single icon but I can't see how to programmatically change it. The "((System.Drawing.Icon)(resources.GetObject("notifyIcon.Icon")))" part doesn't make sense to me.</p>
  
  <pre><code>notifyIcon.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon.Icon")));
  </code></pre>
  
  <p>I tried...</p>
  
  <pre><code>notifyIcon.Icon = (System.Drawing.Icon(Application.StartupPath + @"\noneed.ico"));
  </code></pre>
  
  <p>but wont work. I get the error "System.Drawing.Icon' is a 'type', which is not valid in the given context"</p>
  
  <p>Thanks for the help</p>