Capturing random images
I think everything speaks for itself in the image below. I'm not sure how to write the code开发者_JAVA百科 to acomplish it.
you can store 36 images (or path to iamges) in the collection and when you click on Add button, it chooses random number from 1-36 and load that image to the labels accordingly.
Here are the steps:
Store 36 image filepaths in array Array (i.e. 'image1.jpg' and etc)
Use
Int((36 * Rnd) + 1)
to generate random number between 1 and 36 (you will need to run this 3 times)Create Image control (not label, while you can use label to show some text). and then assign Image.Picture properties to the filepath
精彩评论