PDA

View Full Version : picture boxes visual basic 2008.....


aimseeker
06-16-2010, 08:07 PM
hey everyone!!!
well i am programming in vb 2008 and i hav a little problemo.....
I hav added 8 picture boxes in my application and i wana know if i can go through all those 8 picture boxes in a "FOR LOOP" ...something lyk this....

for i=0 to 7 step 1
picturebox(i).image=image.fromfile(path)

now the problem is that i am not allowed to use "picturebox(i)" .... is there a way to go through all the picture boxes in a for loop???

any help wud b appriciated......

semiSkim
06-25-2010, 01:10 AM
This what you need? ;)


For i = 0 To 7
picturebox(i).image=image.fromfile(path)
Next i

P.S. Don't worry about the step, you don't need it for increments of 1 on each loop :)