3个回答
2013-12-03
展开全部
先计算位图宽高,计算个起始点使其居中,具体方法是建立两个PictureBox:Pic1、Pic2,且Pic2的“AutoSize”属性设为“True”,Pic1的“AutoRedraw”属性设为“True”
Set Pic2.Picture=LoadPicture(……)
Pic1.PaintPicture Pic2.Picture, (Pic1.ScaleWidth-Pic2.ScaleWidth)\2, (Pic1.ScaleHeight-Pic2.ScaleHeight)\2, Pic2.ScaleWidth, Pic2.ScaleHeight
Set Pic2.Picture=LoadPicture(……)
Pic1.PaintPicture Pic2.Picture, (Pic1.ScaleWidth-Pic2.ScaleWidth)\2, (Pic1.ScaleHeight-Pic2.ScaleHeight)\2, Pic2.ScaleWidth, Pic2.ScaleHeight
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询