I am just wondering how i can create a picturebox array like i could when i copied and pasted another picturebox in VB6 and it asked me if i want to add them to an array. Doing so made them code like this:
picBox(0).enabled = true
picBox(1).enabled = true
etc etc..
But i am unable to do this using VB.net 2010! I’m sure there is a way to do that for each of my pictureboxs’ on my form but i am unable to find out how!?
Any help would be great! :o)
David
You can declare a
PictureBox()or aList(Of PictureBox)in the code-behind and add your pictureboxes to it in the constructor.You can even populate the list by looping over the
Controlscollection of the container that holds the pictureboxes.