Change PictureBox's image to image from my resources?

后端 未结 6 2060
我寻月下人不归
我寻月下人不归 2020-12-08 14:38

How do I set a PictureBox image to an image from my resources?

(I tried this without success: pictuerbox.Image = \"img_location\";)

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-08 14:51

    You can use a ResourceManager to load the image.

    See the following link: http://www.java2s.com/Code/CSharp/Development-Class/Saveandloadimagefromresourcefile.htm

提交回复
热议问题