访问图像中的项目的资源? [英] Accessing an image in the projects resources?
本文介绍了访问图像中的项目的资源?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何访问图像?
我希望能够做这样的事情:
如果(值){
picBox1.image = Resources.imageA;
}
其他
{
picBox2.image = Resources.imageB;
}
解决方案
something.Image = Namespace.ProjectName.Properties.Resources.ImageName;
How do I access an image during run time that I have added to the projects resources?
I would like to be able to do something like this:
if (value) {
picBox1.image = Resources.imageA;
}
else
{
picBox2.image = Resources.imageB;
}
解决方案
something.Image = Namespace.ProjectName.Properties.Resources.ImageName;
这篇关于访问图像中的项目的资源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文