i have a form witch contains few user controls
each control has combobox and 30 pictureboxes.

each time i select a number from the combobox i want to press a button in my form and change the color of the picturebox for as many pictureboxes as i choose.

for example: i have 30 gray pictureboxes in my sontrol.
when i choose 10 i want to press the button in my form and paint the first 10 picture boxes in different color.

i added all pictureboxes to the user in a static way , i just dragged them from the toolox
to the control.

my question is how can i change the pictureboxs color in a loop from my buttonclick function?

i needed to add a picturebox array as property
to the user.