Veo que no llevas mucha prisa, como te había comentado tenía un poco de trabajo y me ausente por un tiempo de la oficina y en mi casa no me iba a poner a trabajar en algo que me quitara tiempo para jugar un poco de Formula 1
Pega este código en el evento rowheader de tu data grid, espero esto te funcione
Código:
Private Sub DataGridView1_RowHeaderMouseClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles DataGridView1.RowHeaderMouseClick
Dim conexion As SqlConnection = New SqlConnection("TUCADENOTA DE CONEXION")
Dim idImagen As String = ""
idImagen = Me.DataGridView1.SelectedRows(0).Cells(0).Value
Try
conexion.Open()
Dim comando As SqlCommand = New SqlCommand("TU SELECCION where idImg=@param")
comando.Connection = conexion
comando.Parameters.Add("@param", SqlDbType.Int).Value = idImagen
Dim lector As SqlDataReader = comando.ExecuteReader
If lector.HasRows Then
If lector.Read Then
Dim bytes As Byte() = lector.GetValue(0)
Dim memoria As MemoryStream = New MemoryStream()
memoria.Write(bytes, 0, bytes.Length - 1)
Me.PictureBox1.Image = System.Drawing.Image.FromStream(memoria)
End If
End If
Catch ex As Exception
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub