title: Load Image from Resources/ResourceManager
body: <p>I have a picturebox that I want to load an image into at runtime depending on what a user types in a textbox. </p>
  
  <p>I have created a file named Formations.resx within my project and loaded my images into it. I am have tried both of the following but had no luck, what am I doing wrong?</p>
  
  <pre><code>pictureBoxFormation.Image = Properties.Resources.ResourceManager.GetObject("random_" + firstPoint) as Image;
  </code></pre>
  
  <p>This code executes fine, but the <code>.Image</code> property of my picturebox isn't updated by it, I am guessing that this code doesn't look in my file specifically, where is it looking?</p>
  
  <pre><code>ResourceManager rm = new ResourceManager("Formations", Assembly.GetExecutingAssembly());
  pictureBoxFormation.Image = rm.GetObject("random_" + firstPoint) as Image;
  </code></pre>
  
  <p>This throws an error, which is as follows:</p>
  
  <p><code>An unhandled exception of type 'System.Resources.MissingManifestResourceException' occurred in mscorlib.dll</code> </p>
  
  <p><code>Additional information: Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure "Formations.resources" was correctly embedded or linked into assembly "WindowsFormsApplication1" at compile time, or that all the satellite assemblies required are loadable and fully signed.</code></p>