Start New Discussion within our Software Development Community

help me guys.. how do i add picture?

Private Sub NavigateRecords()

        txtPersonnelID.Text = ds.Tables("Personnel").Rows(inc).Item(0)
        txtFirstName.Text = ds.Tables("Personnel").Rows(inc).Item(1)
        txtLastName.Text = ds.Tables("Personnel").Rows(inc).Item(2)
        txtMiddleName.Text = ds.Tables("Personnel").Rows(inc).Item(3)
        txtGender.Text = ds.Tables("Personnel").Rows(inc).Item(4)
        txtAddress.Text = ds.Tables("Personnel").Rows(inc).Item(5)
        txtContactNo.Text = ds.Tables("Personnel").Rows(inc).Item(6)
        txtEmailAdd.Text = ds.Tables("Personnel").Rows(inc).Item(7)
        txtBday.Text = ds.Tables("Personnel").Rows(inc).Item(8)
        txtDept.Text = ds.Tables("Personnel").Rows(inc).Item(9)
        txtPosition.Text = ds.Tables("Personnel").Rows(inc).Item(10)
        txtHiredDate.Text = ds.Tables("Personnel").Rows(inc).Item(11)
        txtRenewalDate.Text = ds.Tables("Personnel").Rows(inc).Item(12)

        PicBox.Visible = ds.Tables("Personnel").Rows(inc).Item(13)


    End Sub

What do you have on Item(13)? On your code ony a boolean value showing or not the picture box.

What do you should have?. A good soultion is to have the full path to the picture(I.E. "D:\Pictures\PeopleILike01.jpg" or "\\Hostname\Sharename\PicturesDir\PictureNumber765.tif" ). In this case you can:

PicBox.ImageLocation = ds.Tables("Personnel").Rows(inc).Item(13)
PicBox.Refresh

This question has already been answered. Start a new discussion instead.