这么麻烦啊!网上找了找,很少有这样的一类代码!好像很麻烦啊!
网上查了一段代码,有些看不明白!脑子都有点昏了!囊帮注释一下吗?
特别是在Image1.Visible 的Image1上和Image1(i)上,后者好像是个数组类的!可是那前者是什么?请指教一下
Private Sub Command2_Click() '多图片显示
On Error Resume Next
Dim i As Integer
Dim j As Integer
j = File1.ListCount + 1
If Image1.Visible = True Then
Call Command3_Click
End If
For i = 1 To j
Load Image1(i)
Image1(i).Visible = True
Image1(i).Left = Image1(i - 1).Left + 1400
Image1(i).Top = Image1(i - 1).Top
Image1(i - 1).Picture = LoadPicture(dir1.Path + "\" + File1.List(i - 1))
DoEvents
If Image1(i).Left >= 10000 Then
Image1(i).Top = Image1(i - 1).Top + 1200
Image1(i).Left = Image1(0).Left
End If
Next
'判断是否有Image1控件被picture1遮挡了
If (Image1(j - 3).Top + Image1(j - 3).Height) > frame1.Height Then
frame1.Height = (Image1(j - 3).Top + Image1(j - 3).Height) + 100
End If
VScroll1.Max = frame1.Height - Picture1.Height
End Sub
Private Sub Command3_Click()
Dim i As Integer
For i = 1 To Image1.Count - 1
Unload Image1(i)
Next
Image1(0).Picture = LoadPicture("")
VScroll1.Max = 0
End Sub