我的My.Resources中有一组图像。我想选择要在运行时动态显示的图像。我该怎么做呢?
'Static (Compile time) Assignment
UltraPictureBox1.Image = my.Resources.zoo_picture_1
'Dynamic (Runtime) Assignment
UltraPictureBox1.Image = ???
最佳答案
找到了解决方案:
UltraPictureBox1.Image = _
My.Resources.ResourceManager.GetObject(object_name_as_string)
关于.net - VB.Net:从My.Resources动态选择图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1190729/