hi i have a stored image in my database. i want it to be displayed in picturebox. anyone here know how to that?
here is my code

Private Sub ListView1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListView1.SelectedIndexChanged
        Dim index As ListView.SelectedIndexCollection = ListView1.SelectedIndices
        Dim i As Integer = 0
        For Each i In index
            txtConID.Text = ListView1.Items(i).SubItems(0).Text
            txtLname.Text = ListView1.Items(i).SubItems(1).Text
            txtfname.Text = ListView1.Items(i).SubItems(2).Text
            txtmname.Text = ListView1.Items(i).SubItems(3).Text
            txtadd.Text = ListView1.Items(i).SubItems(4).Text
            txtcontactno.Text = ListView1.Items(i).SubItems(5).Text
            txtemail.Text = ListView1.Items(i).SubItems(6).Text
            txtDOB.Text = ListView1.Items(i).SubItems(7).Text
        Next
        PictureBox1.Image = ???


    End Sub

that will depend on how the image is stored in the database
1. if you are storing only the file path

You need to retrieve the path from Db and point to the same from Picture Box.

2. if the image is stored as a binary stream.

retrieve the stream
recreate the image from stream
display in Picture Box.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.