KScarlett
2011-01-24 08:11:11 UTC
i want to have a for loop the set the image inside a picture box to a set image from my hard-drive.
I don't want to have to do 42 of these
PictureBox43.Image = System.Drawing.Image.FromFile("")
Changing the number everytime. But when i use a for loop
For i = 1 to 42
Pictureboxi.image = System.Drawing.Image.FromFile("")
next
I know it's because the pictureboxi is considered a name for a picture box and the computer can't find my pictureboxi.
So what way is there for me to make this loop?
I'm using VB.net on visual studio 2010 on the college computers by the way.