How to Load an Image onto PictureBox in Visual Studio using C# -


i have been trying use following code load image resources picture box on visual studio 2012 using c#.

picturebox1.load(properties.resources.desert); 

and have been getting following errors.

  1. the best overloaded method match system.windows.forms.picturebox.load(string) has invalid arguments
  2. argument 1: cannot convert system.drawing.bitmap string

the load method takes string. directly passing resource bitmap.. won't work.

try this:

picturebox1.image = properties.resources.desert; 

this directly set image in picturebox bitmap in resources.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -