Change PictureBox's image to image from my resources?

MasterMastic picture MasterMastic · Jul 3, 2011 · Viewed 184.8k times · Source

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

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

Answer

Ken Wayne VanderLinde picture Ken Wayne VanderLinde · Jul 3, 2011

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

picturebox.Image = project.Properties.Resources.imgfromresource