Private Sub ListBox1_SelectedIndexChanged() Handles ListBox1.SelectedIndexChanged
Dim index As Integer = ListBox1.SelectedIndex
Me.BindingContext(ds, "emp").Position = index
_position = index
ShowPicture(index)
UpdateStatus()
End Sub
Private Sub ShowPicture(ByVal index As Integer)
Dim imgbyte() As Byte = ds.Tables("emp").Rows(index)("picture")
Dim imgStream As New MemoryStream(imgbyte)
Dim offset As Integer = 78
imgStream.Write(imgbyte, offset, imgbyte.Length - offset)
If (imgStream.Length > -1) Then
PictureBox1.Image = Image.FromStream(imgStream)
Else
PictureBox1.Image = Nothing
End If
End Sub