VB.Net: Dynamically Select Image from My.Resources

前端 未结 5 775
忘了有多久
忘了有多久 2021-02-05 06:03

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) Assig         


        
5条回答
  •  萌比男神i
    2021-02-05 06:22

    Make sure you don't include extension of the resource, nor path to it. It's only the resource file name.

    PictureBoxName.Image = My.Resources.ResourceManager.GetObject("object_name") 
    

提交回复
热议问题