Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VB.Net: Dynamically Select Image from My.Resources

Tags:

I have a group of images in my My.Resources. I want to select select images to display dynamically at run time. How do I do this?

'Static (Compile time) Assignment UltraPictureBox1.Image = my.Resources.zoo_picture_1  'Dynamic (Runtime) Assignment UltraPictureBox1.Image = ??? 
like image 511
Jeff Avatar asked Jul 27 '09 21:07

Jeff


1 Answers

Found the solution:

UltraPictureBox1.Image = _     My.Resources.ResourceManager.GetObject(object_name_as_string) 
like image 77
Jeff Avatar answered Nov 02 '22 19:11

Jeff