MasterMastic MasterMastic - 2 months ago 8
C# Question

Change PictureBox's image to image from my resources?

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

(I tried this without success:

pictuerbox.Image = "img_location";
)

Answer

If you loaded the resource using the visual studio UI, then you should be able to do this:

picturebox.Image = project.Properties.Resources.imgfromresource
Comments