title: Load picturebox image in C# from file in relative path
body: <p>I have a picturebox image in a Windows Form Solution. After user selects an item from a database, I want to load an image into this picturebox. The filename of the image will come from the database and all images must be stored in a subfolder of the application folder (\Images).
  I don't want to include all these (2000-3000 images) in my solution, besides, more images will be added by users as the database grows.
  Also, I don't want to code an absolute path. So this is not what I want:</p>
  
  <pre><code>pictureBox.Image = Image.FromFile(@"C:\Program Files\Application\Images\" + dbase.filename);
  </code></pre>
  
  <p>I want to code a relative path to the image folder, so regardless of where the application will be installed, the images can be loaded from this particular subfolder.
  I've tried things like these, using a temporary test-image called "test.jpg":</p>
  
  <pre><code>pictureBox.Image = Image.FromFile(@"Images\test.jpg");
  pictureBox.Image = Image.FromFile(@"..\Images\test.jpg");
  pictureBox.Image = Image.FromFile(@"|DataDirectory|\Images\test.jpg");
  </code></pre>
  
  <p>But these don't work. I can only get it to work with an absolute path, like "C:\Images\test.jpg". What should I do?</p>