As .paul. suggests, you should use one PictureBox per image. If you add a FlowLayoutPanel to your form, you can then create PictureBoxes at run-time and add them to it and it will handle the layout for you.
vb.net Code:
'Clear any existing images if required.
For Each pictureBox In FlowLayoutPanel1.Controls.Cast(Of PictureBox)().ToArray()
pictureBox.Image.Dispose()
pictureBox.Dispose()
Next
Using connection As New SqlConnection("Data Source=ALLAYE\SQLEXPRESS;Initial Catalog=E-commerce;Integrated Security=True"),
command As New SqlCommand("SELECT ProductImage FROM ProductTB", connection)
connection.Open()
Using reader = command.ExecuteReader()
Do While reader.Read()
Using stream As New MemoryStream(DirectCast(reader("ProductImage"), Byte()))
Dim img = Image.FromStream(stream)
Dim pictureBox As New PictureBox With {.SizeMode = PictureBoxSizeMode.AutoSize,
.Image = img}
FlowLayoutPanel1.Controls.Add(pictureBox)
End Using
Loop
End Using
End Using