读书人

怎样取得WinForm中的PictureBox缩放后

发布时间: 2012-03-19 22:03:04 作者: rapoo

怎样取得WinForm中的PictureBox缩放后的图片大小
比如一个图片是800x600
在PictureBox中显示,PictureBox 是150x150,显示模式是Zoom
怎样获得在PictureBox中的缩放图的Size?

[解决办法]
帮顶
[解决办法]
UP
[解决办法]
PropertyInfo _ImageRectanglePropert = pictureBox1.GetType().GetProperty("ImageRectangle", BindingFlags.Instance | BindingFlags.NonPublic);

Rectangle _Rectangle =(Rectangle)_ImageRectanglePropert.GetValue(pictureBox1, null);

MessageBox.Show(_Rectangle.ToString());


这样看看.

读书人网 >.NET Framework

热点推荐