Growler
Member
- Joined
- Sep 23, 2010
- Messages
- 13
- Programming Experience
- Beginner
I'll keep this short and simple... I asked this question before, but It wasn't answered completely. I'd like to get several images from a folder, and add them to an array. This is not working, can someone explicitly tell me how to do it? Thanks!
At the top, I have:
On Form load: ADD IMAGES TO ARRAY
On Add Button click: DISPLAY EACH IMAGE FROM ARRAY IN PICTURE PICTUREBOX(i)
Thanks!!!
At the top, I have:
VB.NET:
Dim dir = New IO.FileInfo("C:\Users\turcotd\Desktop\MyImageFolder\")
Dim images = dir.GetFiles("*.jpg", IO.SearchOption.AllDirectories)
Dim imageArray As New ArrayList()
On Form load: ADD IMAGES TO ARRAY
VB.NET:
For Each img As Image In images
imageArray.Add(img)
Next
On Add Button click: DISPLAY EACH IMAGE FROM ARRAY IN PICTURE PICTUREBOX(i)
VB.NET:
If (i < 6) Then
pictureArray(i).Load(imageArray(i))
i = i + 1
End If
Thanks!!!