开发者

Capturing random images

开发者 https://www.devze.com 2023-02-25 13:16 出处:网络
I think everything speaks for itself in the image below.I\'m not sure how to write the code开发者_JAVA百科 to acomplish it.

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

精彩评论

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