vb scrollbar 图片调整大小
vbscrollbar图片调整大小,请高人编一个。就是在图画框里面调整比图画框大的图纸好,我加到20分。...
vb scrollbar 图片调整大小,请高人编一个。
就是在图画框里面调整比图画框大的图纸
好,我加到20分。 展开
就是在图画框里面调整比图画框大的图纸
好,我加到20分。 展开
2个回答
展开全部
不用那么复杂:添加一个按钮,一个picturebox,一个imagebox,一个垂直滚动条
pictruebox里visible属性是false autoresize属性是true,imagebox里strength是true,然后粘贴下面的代码即可
Private LoadPic As Boolean
Private Sub Command1_Click()
Me.ScaleMode = 3
Set Picture1.Picture = LoadPicture("C:\Documents and Settings\gshi\My Documents\My Pictures\未命名.jpg")
Image1.Height = Picture1.Height
Image1.Width = Picture1.Width
Set Image1.Picture = LoadPicture("C:\Documents and Settings\gshi\My Documents\My Pictures\未命名.jpg")
LoadPic = True
VScroll1.Max = 1
VScroll1.Min = 200
VScroll1.Value = 100
End Sub
Private Sub VScroll1_Change()
If LoadPic Then
Image1.Height = Picture1.Height * (VScroll1.Value / 100)
Image1.Width = Picture1.Width * (VScroll1.Value / 100)
End If
End Sub
不明白的百度HI我
pictruebox里visible属性是false autoresize属性是true,imagebox里strength是true,然后粘贴下面的代码即可
Private LoadPic As Boolean
Private Sub Command1_Click()
Me.ScaleMode = 3
Set Picture1.Picture = LoadPicture("C:\Documents and Settings\gshi\My Documents\My Pictures\未命名.jpg")
Image1.Height = Picture1.Height
Image1.Width = Picture1.Width
Set Image1.Picture = LoadPicture("C:\Documents and Settings\gshi\My Documents\My Pictures\未命名.jpg")
LoadPic = True
VScroll1.Max = 1
VScroll1.Min = 200
VScroll1.Value = 100
End Sub
Private Sub VScroll1_Change()
If LoadPic Then
Image1.Height = Picture1.Height * (VScroll1.Value / 100)
Image1.Width = Picture1.Width * (VScroll1.Value / 100)
End If
End Sub
不明白的百度HI我
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询