Multiple PictureBoxs' C#

Posted by Austin Smith on Stack Overflow See other posts from Stack Overflow or by Austin Smith
Published on 2012-12-02T04:25:44Z Indexed on 2012/12/02 5:04 UTC
Read the original article Hit count: 128

Filed under:
|

I'm having a hard time figuring this out. I know pictureBox only lets you display one image a time. I'm trying to create a pictureBox for each image in my collection. For instance if I have ten images in my List, then the method should create ten pictureBox for those respective images so each one is displayes in a pictureBox. I'm not sure which would be better a for loop or a foreach loop instead. every time the loop increments both the varaiables XCoordinate and YCoordinate which are the location of the PictireBox shoulld increase so that the PictureBox won't overlap one another in the Form. The reason for the method is that the number of images in the collection can change everytime the application will run. That's why I'm not creating them manually. So after its done all the pictures in the list should appear in a picture.Box. The box should be all the same size the only difference is the location on the form and the images inside them. Please any help and I will be grateful

© Stack Overflow or respective owner

Related posts about c#

Related posts about winforms