这是一个图片浏览器的代码Dim JB As Integer
Private Sub Dir1_Change()
File1.Path = Dir1.Path
End SubPrivate Sub Drive1_Change()
  On Error GoTo ju
Dir1.Path = Drive1.Drive
Exit Sub
ju:
MsgBox "Drive not ready!"
Exit Sub
End Sub
Private Sub Command3_Click()
JB = 0
Call uppd
End SubSub uppd()
Frame1.Visible = True
Frame2.Visible = True
Frame3.Visible = True
Frame4.Visible = True
Frame5.Visible = True
Frame6.Visible = True
Frame7.Visible = True
Frame8.Visible = True
On Error GoTo balle1
File.ListIndex = JB
If Right(File.Path, 1) <> "\" Then
         nisse.Caption = File1.Path & "\" & File1.FileName
     Else
        nisse.Caption = File1.Path & File1.FileName
        End If
Frame1.Caption = File1.FileName
Image1.Picture = LoadPicture(nisse.Caption)
On Error GoTo balle2
JB = JB + 1
File1.ListIndex = JB
File.ListIndex = JB
If Right(File.Path, 1) <> "\" Then
         nisse.Caption = File1.Path & "\" & File1.FileName
     Else
        nisse.Caption = File1.Path & File1.FileName
        End If
Frame2.Caption = File.FileName
Image2.Picture = LoadPicture(nisse.Caption)
On Error GoTo balle3
JB = JB + 1
File1.ListIndex = JB
File.ListIndex = JB
If Right(File.Path, 1) <> "\" Then
         nisse.Caption = File1.Path & "\" & File1.FileName
     Else
        nisse.Caption = File1.Path & File1.FileName
        End If
Frame3.Caption = File.FileName
Image3.Picture = LoadPicture(nisse.Caption)
On Error GoTo balle4
JB = JB + 1
File1.ListIndex = JB
File.ListIndex = JB
If Right(File.Path, 1) <> "\" Then
         nisse.Caption = File1.Path & "\" & File1.FileName
     Else
        nisse.Caption = File1.Path & File1.FileName
        End If
Frame4.Caption = File.FileName
Image4.Picture = LoadPicture(nisse.Caption)
On Error GoTo balle5
JB = JB + 1
File1.ListIndex = JB
File.ListIndex = JB
If Right(File.Path, 1) <> "\" Then
         nisse.Caption = File1.Path & "\" & File1.FileName
     Else
        nisse.Caption = File1.Path & File1.FileName
        End If
Frame5.Caption = File.FileName
Image5.Picture = LoadPicture(nisse.Caption)
On Error GoTo balle6
JB = JB + 1
File1.ListIndex = JB
File.ListIndex = JB
If Right(File.Path, 1) <> "\" Then
         nisse.Caption = File1.Path & "\" & File1.FileName
     Else
        nisse.Caption = File1.Path & File1.FileName
        End If
Frame6.Caption = File.FileName
Image6.Picture = LoadPicture(nisse.Caption)
On Error GoTo balle7
JB = JB + 1
File1.ListIndex = JB
File.ListIndex = JB
If Right(File.Path, 1) <> "\" Then
         nisse.Caption = File1.Path & "\" & File1.FileName
     Else
        nisse.Caption = File1.Path & File1.FileName
        End If
Frame7.Caption = File.FileName
Image7.Picture = LoadPicture(nisse.Caption)
On Error GoTo balle8
JB = JB + 1
File1.ListIndex = JB
File.ListIndex = JB
If Right(File.Path, 1) <> "\" Then
         nisse.Caption = File1.Path & "\" & File1.FileName
     Else
        nisse.Caption = File1.Path & File1.FileName
        End If
Frame8.Caption = File.FileName
Image8.Picture = LoadPicture(nisse.Caption)
Exit Sub
balle1:
Frame1.Visible = False
Resume Next
Exit Sub
balle2:
Frame2.Visible = False
Resume Next
Exit Sub
balle3:
Frame3.Visible = False
Resume Next
Exit Sub
balle4:
Frame4.Visible = False
Resume Next
Exit Sub
balle5:
Frame5.Visible = False
Resume Next
Exit Sub
balle6:
Frame6.Visible = False
Resume Next
Exit Sub
balle7:
Frame7.Visible = False
Resume Next
Exit Sub
balle8:
Frame8.Visible = False
Resume Next
Exit Sub
End Sub