Search code examples
c#winformsimageresourcespicturebox

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";)


Solution

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

    picturebox.Image = project.Properties.Resources.imgfromresource