展开全部
'加入两个Picture控件,picture2放在picture1里面,picture2用来
'加载图片,加入一个水平滚动条和一个垂直滚动条
Private Sub Form_Load()
Picture2.AutoSize = True
Picture2.BorderStyle = 0
Picture1.ScaleMode = 3
Picture2.ScaleMode = 3
HScroll1.Max = Picture2.Width - Picture1.ScaleWidth
VScroll1.Max = Picture2.Height - Picture1.ScaleHeight
End Sub
Private Sub HScroll1_Change()
Picture2.Left = -HScroll1.Value
End Sub
Private Sub VScroll1_Change()
Picture2.Top = -VScroll1.Value
End Sub
'加载图片,加入一个水平滚动条和一个垂直滚动条
Private Sub Form_Load()
Picture2.AutoSize = True
Picture2.BorderStyle = 0
Picture1.ScaleMode = 3
Picture2.ScaleMode = 3
HScroll1.Max = Picture2.Width - Picture1.ScaleWidth
VScroll1.Max = Picture2.Height - Picture1.ScaleHeight
End Sub
Private Sub HScroll1_Change()
Picture2.Left = -HScroll1.Value
End Sub
Private Sub VScroll1_Change()
Picture2.Top = -VScroll1.Value
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询