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.
- the best overloaded method match
system.windows.forms.picturebox.load(string)
has invalid arguments - 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
Post a Comment