title: Populate PictureBox from ListView items
body: <p>Hello everyone i need a little help. I want to populate my <code>PictureBox</code> <code>picpreview</code> from <code>ListView</code> but it says <code>NotSupportedException was unhandled The given path's format is not supported</code>.The textbox seems to be working fine but i got stuck at retrieving my image file. By the way the image is .gif    </p>
  
  <pre><code> Dim sql As String
      Dim ds As New DataSet
      Dim da As New OleDb.OleDbDataAdapter
      Dim cmd As New OleDb.OleDbCommand
      Dim dr As OleDb.OleDbDataReader
  
  Dim inc As Integer
  Dim listselect As String
  Private Sub get_data()
      Try
          lvroutine.Items.Clear()
          connection()
          sql = "SELECT * From tblprogram ORDER BY MUSCLEGROUP ASC"
          cmd = New OleDbCommand(sql, con)
          dr = cmd.ExecuteReader
  
          While dr.Read
              Dim lv As ListViewItem = lvroutine.Items.Add(dr("MUSCLEGROUP"))
  
              With lv.SubItems
  
                  .Add(dr("EXERCISENAME"))
                  .Add(dr("EQUIPMENT"))
                  .Add(dr("PREVIEW"))
  
              End With
          End While
          con.Close()
  
  
      Catch ex As Exception
          Exit Try
      End Try
  End Sub
  Private Sub view_record()
  
      connection()
  
      listselect = lvroutine.SelectedItems.Item(0).Text
  
      sql = "SELECT * From tblprogram WHERE MUSCLEGROUP ='" &amp; listselect &amp; "'"
      cmd = New OleDbCommand(sql, con)
      dr = cmd.ExecuteReader
  
      If dr.Read Then
          txtmuscle.Text = dr("MUSCLEGROUP")
          editprogram.txtexname.Text = dr("EXERCISENAME")
          editprogram.txteq.Text = dr("EQUIPMENT")
          picpreview = dr("PREVIEW")
  
  
      End If
  End Sub
  
  Private Sub clientprogram_Load(sender As Object, e As EventArgs) Handles MyBase.Load
      Call get_data()
      Call connection()
  
      sql = "Select * From tblprogram ORDER BY MUSCLEGROUP ASC"
      da = New OleDb.OleDbDataAdapter(sql, con)
  
      da.Fill(ds, "tblprogram")
  
      con.Close()
  End Sub
  
  Private Sub lvroutine_Click(sender As Object, e As EventArgs) Handles lvroutine.Click
      txtmuscle.Text = lvroutine.SelectedItems(0).SubItems(0).Text
      txtexercise.Text = lvroutine.SelectedItems(0).SubItems(1).Text
      txtequipment.Text = lvroutine.SelectedItems(0).SubItems(2).Text
      'picpreview.Image = Image.FromFile(lvroutine.SelectedItems(0).SubItems(3).ToString)&lt;--- This is where the error is.
  
  End Sub
  
  
  
  
  End Class
  </code></pre>