Smiley
Smiley

Reputation: 3437

PictureBox BackgroundImage Property C#

can someone please refresh me how I can programatically set the background image of a picture box?

Thank you very much!

Upvotes: 1

Views: 23473

Answers (2)

rerun
rerun

Reputation: 25495

PictureBox.Image

--Update

You need an image object. You can use the static function image.fromfile

PictureBox.Image = Image.FromFile(Path)

Upvotes: 4

Javed Akram
Javed Akram

Reputation: 15344

Picture Box have both Image and Background Image Property

to set Background Image you have to set pictureBox1.BackgroundImage=your_Image;

and for Image property pictureBox1.Image=your_Image;

Upvotes: 2

Related Questions