title: ToolStripButton: what's wrong with assigning an image programmatically
body: <p>There is a Form with a ToolStrip. This ToolStrip contains a ToolStripButton. I want to assign an image to this button:</p>
  
  <pre><code>this.btnSaveFile.Image = Bitmap.FromFile("C:\\Work\\Icons\\png\\save.png");
  </code></pre>
  
  <p>It works only if there is save.png on specified path. Otherwise, I get an FileNotFound Exception.</p>
  
  <p>If I created a Form via Form Designer, Visual Studio would create a code like this:</p>
  
  <pre><code>this.toolStripButton9.Image = ((System.Drawing.Image) (resources.GetObject("toolStripButton9.Image")));
  </code></pre>
  
  <p>toolStripButton9.Image here is not a real name. Visual Studio takse my file save.png and transform it into toolStripButton9.Image.</p>
  
  <p>But I create a form programmatically, without Designer. And my question is how to assign an image to the ToolStripBotton programmatically?</p>
  
  <p>I tried to add the image to the project, but it didn't help much. I have no idea how to make Visual Studio grab it and embed into my executable so that I wouldn't need this file on specified location.</p>
  
  <p>In MSDN, I only see the solution like <a href="http://ms-help://MS.MSDNQTR.v80.en/MS.MSDN.v80/MS.NETDEVFX.v20.en/cpref32/html/P_System_Windows_Forms_ToolStripItem_Image.htm" rel="nofollow noreferrer">that</a>:</p>
  
  <pre><code>this.toolStripButton1.Image = Bitmap.FromFile("c:\\NewItem.bmp");
  </code></pre>
  
  <p>But it doesnt' work as I told above. I understand there is a simple solution but don't see it. Could you please give me a hint?</p>