PictureBox BackgroundImage属性C#

PictureBox BackgroundImage属性C#

问题描述:

有人可以请刷新我如何以编程方式设置图片框的背景图像?PictureBox BackgroundImage属性C#

非常感谢!

图片框兼得ImageBackground Image物业

设置Background Image你必须设置pictureBox1.BackgroundImage=your_Image;

Image财产pictureBox1.Image=your_Image;

+0

非常感谢。如果我想使用在我的应用程序的资源文件中找到的图像怎么办?我将如何以编程方式访问它? – Smiley 2010-11-07 06:57:23

+1

namespace_name.Properties.Resources.Your_Image; – 2010-11-07 06:59:30

PictureBox.Image

--update

你需要一个图像对象。您可以使用静态函数image.fromfile

PictureBox.Image = Image.FromFile(Path)

+0

我知道这一点,但我只是不知道包含图像来源的确切语法。 – Smiley 2010-11-07 06:46:43