Quote Originally Posted by dday9 View Post
What I'd do is not generate random pictureboxes, rather generate random images in a static picturebox. Simply add a picturebox and a button to your form, and then open up the code view. In the code view declare a new list(of images) and a new instance of the random class at the form level. In your form_load event load the desired images to the list using the .Add or the .AddRange method. Next, in the button's click event you'd set the picturebox's image equal to a random item in your list(of images) using the Random.Next:
Code:
PictureBox1.Image = fooList.Item(r.Next(0, fooList.Count + 1))
Thank you! So this is how I can get random images into my picture boxes. I am planning to have multiple, random picture boxes move in from the sides of the form with random images within each of them. So that's sorted.

Quote Originally Posted by Shaggy Hiker View Post
Yeah, you do. Otherwise, that's what I'd do, too. I don't like creating new controls unless I absolutely have to. Create them once, cache them if needed, then toggle their visibility. Dynamic creation will work, but you may well end up fighting performance issues if you do that.
Yeah, I want to try and avoid any performance issues.

My next step is to randomly assign movement to these picture boxes so that only a select few are in movement.

Cheers for the help guys!