开发者

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.

Capturing random images


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜