Try this
Private Sub Gridview_selectedIndexchenge(ByVal sender As Object, ByVal e As EventArgs) Handles DataGridView1.MouseClick
me.panel1.controls.clear()
wid = 0
For Each DGRS As DataGridViewRow In DataGridView1.SelectedRows
Dim I As Integer = 0
I = DataGridView1.SelectedRows(0).Index
Dim IC As Integer = 0
IC = DataGridView1.Columns(0).Index
If DGRS.Selected = True Then
Dim rowpic = (DataGridView1.Rows(I).Cells(0).Value)
PictureBox1.Image = rowpic
PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage
DGRS.Dispose()
End If
Next
For Each Imgdgvi As DataGridViewImageCell In DataGridView1.SelectedCells
Dim pic As New PictureBox()
pic.Image = Imgdgvi.Value
pic.SizeMode = PictureBoxSizeMode.StretchImage
pic.SetBounds(wid, 20, 200, 100)
AddHandler pic.Click, AddressOf convertPic
Me.Panel1.Controls.Add(pic)
wid += 205
Next
End Sub