为什么不是PictureBox.Image自动缩放以适应? [英] Why isn't PictureBox.Image autoscaling to fit in?

查看:140
本文介绍了为什么不是PictureBox.Image自动缩放以适应?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在那里用户选择图片(用打开文件对话框)和接口它在一个固定大小的图片框所示。我想这幅画以适应即使分辨率高的图片框。

I've an interface where user selects picture (using OpenFileDialog) and its shown in a fixed size picturebox. I want this picture to fit in the picturebox even if the resolution is high.

做什么财产,我需要设置序让我的形象AutoScaleToFitIn的PicutreBox?

What property do I need to set inorder to let my image AutoScaleToFitIn the PicutreBox?

推荐答案

您可以设置<一个href="http://msdn.microsoft.com/en-us/library/system.windows.forms.picturebox.sizemode.aspx">PictureBox.SizeMode属性<一个href="http://msdn.microsoft.com/en-us/library/system.windows.forms.pictureboxsizemode.aspx">StretchImage.

这篇关于为什么不是PictureBox.Image自动缩放以适应?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆