Can you setup an array for the PictureBoxes?
I would like to create a picture viewer (thumbnail viewer). Basically to look at a particular folder & display thumbnail of the picture files. Instead of writing code for an unknown number of pictures & pictureboxes in a directory. It would be nice to setup an array & do something like this
FOR intX = 1 to intTotal
picBox(intX).ImageLocation = (strDirectory & "\" & ListBox1.Items(intX + intPageMultiplier).ToString)
Next
Are there any videos or tutorials on picture viewer creations?
Code as is right now:
picBox1.ImageLocation = (strDirectory & "\" & ListBox1.Items(0 + intPageMultiplier).ToString)
picBox2.ImageLocation = (strDirectory & "\" & ListBox1.Items(1 + intPageMultiplier).ToString)
picBox3.ImageLocation = (strDirectory & "\" & ListBox1.Items(2 + intPageMultiplier).ToString)
picBox4.ImageLocation = (strDirectory & "\" & ListBox1.Items(3 + intPageMultiplier).ToString)
picBox5.ImageLocation = (strDirectory & "\" & ListBox1.Items(4 + intPageMultiplier).ToString)
picBox6.ImageLocation = (strDirectory & "\" & ListBox1.Items(5 + intPageMultiplier).ToString)
picBox7.ImageLocation = (strDirectory & "\" & ListBox1.Items(6 + intPageMultiplier).ToString)
picBox8.ImageLocation = (strDirectory & "\" & ListBox1.Items(7 + intPageMultiplier).ToString)
picBox9.ImageLocation = (strDirectory & "\" & ListBox1.Items(8 + intPageMultiplier).ToString)
picBox10.ImageLocation = (strDirectory & "\" & ListBox1.Items(9 + intPageMultiplier).ToString)
picBox11.ImageLocation = (strDirectory & "\" & ListBox1.Items(10 + intPageMultiplier).ToString)
picBox12.ImageLocation = (strDirectory & "\" & ListBox1.Items(11 + intPageMultiplier).ToString)
picBox13.ImageLocation = (strDirectory & "\" & ListBox1.Items(12 + intPageMultiplier).ToString)
picBox14.ImageLocation = (strDirectory & "\" & ListBox1.Items(13 + intPageMultiplier).ToString)
picBox15.ImageLocation = (strDirectory & "\" & ListBox1.Items(14 + intPageMultiplier).ToString)
picBox16.ImageLocation = (strDirectory & "\" & ListBox1.Items(15 + intPageMultiplier).ToString)
picBox17.ImageLocation = (strDirectory & "\" & ListBox1.Items(16 + intPageMultiplier).ToString)
picBox18.ImageLocation = (strDirectory & "\" & ListBox1.Items(17 + intPageMultiplier).ToString)
picBox19.ImageLocation = (strDirectory & "\" & ListBox1.Items(18 + intPageMultiplier).ToString)
picBox20.ImageLocation = (strDirectory & "\" & ListBox1.Items(19 + intPageMultiplier).ToString)
I would like to create a picture viewer (thumbnail viewer). Basically to look at a particular folder & display thumbnail of the picture files. Instead of writing code for an unknown number of pictures & pictureboxes in a directory. It would be nice to setup an array & do something like this
FOR intX = 1 to intTotal
picBox(intX).ImageLocation = (strDirectory & "\" & ListBox1.Items(intX + intPageMultiplier).ToString)
Next
Are there any videos or tutorials on picture viewer creations?
Code as is right now:
picBox1.ImageLocation = (strDirectory & "\" & ListBox1.Items(0 + intPageMultiplier).ToString)
picBox2.ImageLocation = (strDirectory & "\" & ListBox1.Items(1 + intPageMultiplier).ToString)
picBox3.ImageLocation = (strDirectory & "\" & ListBox1.Items(2 + intPageMultiplier).ToString)
picBox4.ImageLocation = (strDirectory & "\" & ListBox1.Items(3 + intPageMultiplier).ToString)
picBox5.ImageLocation = (strDirectory & "\" & ListBox1.Items(4 + intPageMultiplier).ToString)
picBox6.ImageLocation = (strDirectory & "\" & ListBox1.Items(5 + intPageMultiplier).ToString)
picBox7.ImageLocation = (strDirectory & "\" & ListBox1.Items(6 + intPageMultiplier).ToString)
picBox8.ImageLocation = (strDirectory & "\" & ListBox1.Items(7 + intPageMultiplier).ToString)
picBox9.ImageLocation = (strDirectory & "\" & ListBox1.Items(8 + intPageMultiplier).ToString)
picBox10.ImageLocation = (strDirectory & "\" & ListBox1.Items(9 + intPageMultiplier).ToString)
picBox11.ImageLocation = (strDirectory & "\" & ListBox1.Items(10 + intPageMultiplier).ToString)
picBox12.ImageLocation = (strDirectory & "\" & ListBox1.Items(11 + intPageMultiplier).ToString)
picBox13.ImageLocation = (strDirectory & "\" & ListBox1.Items(12 + intPageMultiplier).ToString)
picBox14.ImageLocation = (strDirectory & "\" & ListBox1.Items(13 + intPageMultiplier).ToString)
picBox15.ImageLocation = (strDirectory & "\" & ListBox1.Items(14 + intPageMultiplier).ToString)
picBox16.ImageLocation = (strDirectory & "\" & ListBox1.Items(15 + intPageMultiplier).ToString)
picBox17.ImageLocation = (strDirectory & "\" & ListBox1.Items(16 + intPageMultiplier).ToString)
picBox18.ImageLocation = (strDirectory & "\" & ListBox1.Items(17 + intPageMultiplier).ToString)
picBox19.ImageLocation = (strDirectory & "\" & ListBox1.Items(18 + intPageMultiplier).ToString)
picBox20.ImageLocation = (strDirectory & "\" & ListBox1.Items(19 + intPageMultiplier).ToString)