Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27554

VS 2008 ListView1.Items(i).ImageIndex - Help

$
0
0
Hi there! I need help.
The main problem is that i want to use the imagelist into the listview,
but i only have 6 images.
I tried to randomize it but it didn't work.

The code I'm using:

Code:

Timer1.start()

 For Each l As Object In ListBox2.Items
            ListView1.Items.Add(l, nIndex)
            ListView1.Items(i).ImageIndex = i
            nIndex += 1
        Next

Timer
Code:

If nIndex = Total Then
    Timer1.Stop()
Else
    i = rn.Next(0, ImageList1.Images.Count - 1)
        End If

Ps.: Use all images even if it reapet itself, with all ListBoxItems to listview.

Viewing all articles
Browse latest Browse all 27554

Trending Articles