Loading an image

How would i load an image Programmatically into the forms back ground when the program starts, it will pull the image from c:\program files\blah.

How would I do this for the back ground image for a picturebox aswell?

schenkpAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Carl TawnConnect With a Mentor Systems and Integration DeveloperCommented:
Fairly simple really, just use the static method FromFile of the Image class:

    this.BackgroundImage = Image.FromFile("Path and name of your image");

The same code will also work for a PictureBox.
0
All Courses

From novice to tech pro — start learning today.