Private Sub Command1_Click()
m_FilesCount = 0
XceedZip1.ListZipContents
End Sub
Private Sub XceedZip1_ListingFile(ByVal sFilename As String, ByVal sComment As String, ByVal lSize As Long, ByVal lCompressedSize As Long, ByVal nCompressionRatio As Integer, ByVal xAttributes As XceedZipLibCtl.xcdFileAttributes, ByVal lCRC As Long, ByVal dtLastModified As Date, ByVal dtLastAccessed As Date, ByVal dtCreated As Date, ByVal xMethod As XceedZipLibCtl.xcdCompressionMethod, ByVal bEncrypted As Boolean, ByVal lDiskNumber As Long, ByVal bExcluded As Boolean, ByVal xReason As XceedZipLibCtl.xcdSkippingReason)
Debug.Print sFilename & vbCrLf
m_FilesCount = m_FilesCount + 1
End Sub
Dim WithEvents Xzip As XceedZip '使用WithEvents关键字是为了能触发对象事件Listing
sub XXX()
Set Xzip = New XceedZip
With Xzip
.ZipFileName = FileToUnZip
.List '这句触发Listing事件
End With
Set Xzip = Nothing
end sub
Private Sub Xzip_Listing(FileName As String, ByVal Size As Long, ByVal PSize As Long, ByVal Processed As Long, ByVal FileAttr As Integer, FTime As String, ByVal CRC As Long, ByVal Ratio As Integer, ByVal Completion As Integer, ByVal Method As Integer, ByVal Encrypted As Integer, ByVal ComLen As Integer, Comment As String)
Debug.Print FileName '将文件名显示在即时窗口中
End Sub