Reputation: 3437
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
Reputation: 25495
--Update
You need an image object. You can use the static function image.fromfile
PictureBox.Image = Image.FromFile(Path)
Upvotes: 4
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