winform中picturebox自适应图片大小

picturebox控件共有两种载入图片方式,分别为:

pictureBox1.BackgroundImage = Image,pictureBox1.load(url)

为使加载的图片自使用控件尺寸,可以分别对pictureBox控件设置BackGroundImageLayout=Stretch,SizeMode=StretchImage

stretch 拉伸英音:[stretʃ]美音:[strɛtʃ] 

你可能感兴趣的:(winform总结)