I have PictureBox picture
.
I use:
picture.Size = bmp.Size;
picture.Image = bmp;
假设有两个整数maxWidth
and maxHeigth
.
我想添加垂直/水平滚动条picture
当其大小超过maxWidth
and/or maxHeight
。我怎样才能做到这一点?
您可以轻松地使用Panel
Control
在表单中插入一个面板,例如 panel1 并设置
panel1.AutoScroll = true;
插入一个PictureBox
to the Panel
,说出图片并设置
picture.SizeMode = PictureBoxSizeMode.AutoSize;
并设置图像
picture.Image = bmp;
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)