![]() |
#2
wufuzhang2019-07-30 09:20
回复 楼主 cmsj3999
|
但在picture4上加载图片,用滚动条则能实现滚动浏览。
Dim top2,h as Integer
Private Sub Form_Load()
Me.VScroll1.Visible = False '滚动条不可见
Me.Picture4.AutoSize = True
Me.VScroll1.Min = 0
Me.VScroll1.Max = Me.Picture4.Height t - Me.Picture3.Height
Me.VScroll1.LargeChange = 365
Set labl(h) = Me.Controls.Add("VB.Label", "labl" & h, Picture4)
' top2 = 3720 + 365 * (h - 1)
top2 = 365 * (h - 1)
With labl(h)
' labl(h).left = 120
labl(h).left = -10
labl(h).Top = top2
labl(h).Width = 2295
labl(h).Height = 375
labl(h).Visible = True
labl(h).BackStyle = 0
labl(h).BorderStyle = 1
labl(h).Appearance = 0
labl(h).Alignment = 2
labl(h).FontSize = 8
labl(h).Caption = tmparry(h)
End With
End sub
Private Sub VScroll1_Change()
Me.Picture4.Top = VScroll1.Value
End Sub
Private Sub VScroll1_Scroll()
Me.Picture4.Top = VScroll1.Value
End Sub
[此贴子已经被作者于2019-7-29 15:42编辑过]