将PictureBox的图像从我的资源更改为图像? [英] Change PictureBox's image to image from my resources?
本文介绍了将PictureBox的图像从我的资源更改为图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何从我的资源中将PictureBox图像设置为图像?
How do I set a PictureBox image to an image from my resources?
(我尝试了这个没有成功: pictuerbox。 Image =img_location;
)
推荐答案
如果您使用以下方式加载资源visual studio UI,那么你应该可以这样做:
If you loaded the resource using the visual studio UI, then you should be able to do this:
picturebox.Image = project.Properties.Resources.imgfromresource
这篇关于将PictureBox的图像从我的资源更改为图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文