问题
can someone please refresh me how I can programatically set the background image of a picture box?
Thank you very much!
回答1:
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;
回答2:
PictureBox.Image
--Update
You need an image object. You can use the static function image.fromfile
PictureBox.Image = Image.FromFile(Path)
来源:https://stackoverflow.com/questions/4116743/picturebox-backgroundimage-property-c-sharp