简体   繁体   中英

Changing the sizemode of a background image in picturebox

My aim was to change the background image and set it's SizeMode as Stretch. Tried a lot so far, any ideas?

EDIT: I am working in C# forms application. Tried simply setting size mode of bg picture:

picturebox1.BackgroundImage = Properties.Resources.Image;
picturebox1.SizeMode = PictureBoxSizeMode.StretchImage;

tried to move around it... no success...

Look at BackgroundImageLayout .
Example:

whatever.BackgroundImageLayout = ImageLayout.Stretch

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM