VB.NET: My.Resources.{VARIABLE}

前端 未结 2 765
后悔当初
后悔当初 2020-12-18 16:34

So I can access an image by My.Resources.ImageName..........

But, that is manually-coded.

What I want is to have my image name saved in a variable, lets call

相关标签:
2条回答
  • 2020-12-18 17:13

    Declare:

    Dim imag as Image
    imag = My.Resources.foto
    PictureBox1.Image = imag
    

    That's it, the image (photo) will appear on the PictureBox1

    0 讨论(0)
  • 2020-12-18 17:19
    My.Resources.ResourceManager.GetObject(var)
    
    0 讨论(0)
提交回复
热议问题