Muchas gracias.
Código:
Adjunto la captura: http://img832.imageshack.us/img832/3779/sinttulok0.png Private Sub catalogo_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim aux1 As Integer Dim i As Integer Dim elemento As New ListViewItem conectarBD() mover_catalogo() rscatalogo.Open("select * from productos", cn) rscatalogo = cn.Execute("select COUNT(imagen) from productos") aux1 = rscatalogo.Fields(0).Value - 1 rscatalogo.Close() mover_catalogo() rscatalogo.Open("select imagen from productos", cn) mover_auxcatalogo() rsauxcatalogo.Open("select * from productos", cn) If Not rscatalogo.EOF And Not rscatalogo.BOF Then rscatalogo.MoveFirst() rsauxcatalogo.MoveFirst() For i = 0 To aux1 Step 1 ImageList1.Images.Add(System.Drawing.Image.FromFile(rscatalogo.Fields(0).Value)) elemento = New ListViewItem elemento.ImageIndex = i elemento.SubItems.Add(rsauxcatalogo.Fields("descripcion").Value.ToString) elemento.SubItems.Add(rsauxcatalogo.Fields("precio").Value.ToString & " €") elemento.SubItems.Add(rsauxcatalogo.Fields("existencia").Value.ToString) ListView1.Items.Add(elemento) rscatalogo.MoveNext() rsauxcatalogo.MoveNext() ListView1.FullRowSelect = False ListView1.MultiSelect = False Next End If rscatalogo.Close() rsauxcatalogo.Close() End Sub