title: Make user choose an image with folderbrowser for a picturebox (VB.NET)
body: <p>Thanks to one of your old questions, I started this code:</p>
  <pre class="lang-vb prettyprint-override"><code>Dim fd As OpenFileDialog = New OpenFileDialog()
  Dim strFileName As String
  
  fd.Title = &quot;Please select an image&quot;
  fd.InitialDirectory = &quot;C:\Users\&quot;
  fd.Filter = &quot;PNG Images (*.png*)|*.png*|JPG Images (*.jpg*)|*.jpg*|JPEG Images (*.jpeg*)|*.jpeg*|All files (*.*)|*.*&quot;
  fd.FilterIndex = 2
  fd.RestoreDirectory = True
  
  If fd.ShowDialog() = DialogResult.OK Then
      strFileName = fd.FileName
  
      Dim ImageTest As Image
      ImageTest = fd.FileName
  
      PictureBox1.Image = ImageTest
  End If
  </code></pre>
  <p>Except that <code>ImageTest</code> is not functional. It gives me the error:</p>
  <blockquote>
  <p>Cannot convert String to Image.</p>
  </blockquote>
  <p>How do I get the user to select a personal image with an <code>OpenFileDialog</code>?</p>