Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I think everything speaks for itself in the image below. I'm not sure how to write the code to acomplish it.
您可以在集合中存储 36 个图像(或 iamges 的路径),当您单击“添加”按钮时,它会从 1-36 中选择随机数并将该图像相应地加载到标签中。
以下是步骤:
在数组 Array 中存储 36 个图像文件路径(即 'image1.jpg' 等)
用于 Int((36 * Rnd) + 1)生成 1 到 36 之间的随机数(您需要运行 3 次)
Int((36 * Rnd) + 1)
创建图像控件(不是标签,而您可以使用标签来显示一些文本)。然后将 Image.Picture 属性分配给文件路径