在vb中如何让图片适应图片框(picturebox控件)的大小? 20
1个回答
展开全部
picturebox没有自动适应的属性,你可以添加一个额外的PictureBox作为缓存进行缩放,缓存命名为picBuff,AutoRedraw=True,AutiResize=True,Visible=false
picBuff.Picture=LoadPicture(...)
pic1.PaintPicture picBuff.Picture,0,0,pic1.ScaleWidth,pic1.ScaleHeight,0,0,picBuff.scalewidth,picBuff.scaleheight,vbsrccopy
picBuff.Picture=LoadPicture(...)
pic1.PaintPicture picBuff.Picture,0,0,pic1.ScaleWidth,pic1.ScaleHeight,0,0,picBuff.scalewidth,picBuff.scaleheight,vbsrccopy
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询