Picture1.Top = 0 '放一个图片框一和滚动条,再将图片框二放在图片框一的里面,拉大图片框二使它比一辩扒大,其它控件放在图片框二中
Picture1.Left = 0
Picture1.Width = Me.ScaleWidth - VScroll1.Width
Picture1.Height = Me.ScaleHeight - HScroll1.Height
VScroll1.Height = Picture1.Height
VScroll1.Left = Picture1.Width
HScroll1.Width = Picture1.Width
HScroll1.Top = Picture1.Height
Picture2.Top = 0
Picture2.Left = 0 '以上都可以在设计时搞定,不用塌昌写代码,有携衫昌用的只有下面四行
VScroll1.Max = Picture2.Height - Picture1.Height
HScroll1.Max = Picture2.Width - Picture1.Width
End Sub
Private Sub HScroll1_Change()
Picture2.Left = -HScroll1.Value
End Sub
Private Sub VScroll1_Change()
Picture2.Top = -VScroll1.Value
End Sub
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)