Private Sub VScroll1_Change()
For i = 1 To ImgListHeard.ListImages.Count
OptHeard(i).Top = -VScroll1.Value
Next i
End Sub
。。怎么回事呢?
弄了半天百思不得其解。。。。 作者:
Nothing 时间: 2006-10-21 23:25
Private Sub VScroll1_Change()
For i = 1 To ImgListHeard.ListImages.Count
OptHeard(i).Top = -VScroll1.Value+i*控件的高
Next i
End Sub 作者:
netice 时间: 2006-10-21 23:37
Private Sub Form_Load()
Dim i As Integer
OptHeard(1).Picture = ImgListHeard.ListImages(1).Picture
OptHeard(1).Value = False
OptHeard(1).Caption = ""
For i = 2 To ImgListHeard.ListImages.Count
Load OptHeard(i)
OptHeard(i).Visible = True
OptHeard(i).Value = False
OptHeard(i).Caption = ""
OptHeard(i).Left = OptHeard(i - 1).Left + OptHeard(i).Width + 100
OptHeard(i).Top = OptHeard(i - 1).Top
If FrmHeard.Width - OptHeard(i).Left <= 800 Then
OptHeard(i).Left = OptHeard(1).Left
OptHeard(i).Top = OptHeard(i - 1).Top + OptHeard(i).Height + 100
End If
OptHeard(i).Picture = ImgListHeard.ListImages(i).Picture
Next i
VScroll1.Max = Picture1.Height - FrmHeard.Height
VScroll1.LargeChange = 100
VScroll1.SmallChange = 20
VScroll1.Value = 0
End Sub
Private Sub Form_Unload(Cancel As Integer)
FrmGetnum.Enabled = True
End Sub
Private Sub OptHeard_Click(Index As Integer)
ChangeHeard = OptHeard(Index).Index
FrmGetnum.PicHeard.Picture = ImgListHeard.ListImages(ChangeHeard).Picture
Unload Me
End Sub
Private Sub VScroll1_Change()
Picture1.Top = -VScroll1.Value'修改前就是楼顶的形式。。不行的
End Sub
Private Sub VScroll1_Scroll()
Call VScroll1_Change
End Sub