resources有关问题请问,已知这样是成功的,但怎么用一句话代替之
resources问题请教,已知这样是成功的,但如何用一句话代替之?
resources问题请教,已知这样是成功的,但如何用一句话代替之?
Select Case text1.text
Case "img1"
PictureBox1.Image = My.Resources.img1
Case "img2"
PictureBox1.Image = My.Resources.img2
Case "img3"
PictureBox1.Image = My.Resources.img3
Case "img4"
PictureBox1.Image = My.Resources.img4
Case "img5"
PictureBox1.Image = My.Resources.img5
End Select
'像这样行吗?
Picturebox1.image=my.resources."text1.text"
肯定不行,但这样你会明白我的需求吧?
------解决方案--------------------
在My.Resources.img1上点右键->转到定义,看看自动这个属性是怎么实现的你就知道了
resources问题请教,已知这样是成功的,但如何用一句话代替之?
Select Case text1.text
Case "img1"
PictureBox1.Image = My.Resources.img1
Case "img2"
PictureBox1.Image = My.Resources.img2
Case "img3"
PictureBox1.Image = My.Resources.img3
Case "img4"
PictureBox1.Image = My.Resources.img4
Case "img5"
PictureBox1.Image = My.Resources.img5
End Select
'像这样行吗?
Picturebox1.image=my.resources."text1.text"
肯定不行,但这样你会明白我的需求吧?
------解决方案--------------------
在My.Resources.img1上点右键->转到定义,看看自动这个属性是怎么实现的你就知道了