Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27349

[RESOLVED] Assign Resource Image files to large number of Picture Boxes via code

$
0
0
I added about 100 images to my project as Resources. They were named "01.jpg," "02.jpg" etc. up to 100. After adding them, they became "_01," "_02," etc.

I have random numbers generated, and want to assign that number image to a picture box accordingly. When I do it at design time, it's like this:

Code:

objCard.Image = My.Resources._01
Is there a way that I can use the random number generated (in this case "1") and choose resource _01 as a result?

Please let me know if that doesn't make sense, thanks!

Viewing all articles
Browse latest Browse all 27349

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>