home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 19
/
CD_ASCQ_19_010295.iso
/
win
/
prg
/
zs20
/
vbx2form.fr_
/
VBX2FORM.FRM
Wrap
Text File
|
1994-11-21
|
10KB
|
288 lines
VERSION 2.00
Begin Form Form2
BackColor = &H00C0C0C0&
BorderStyle = 3 'Fixed Double
Caption = "Zip file informations..."
ClientHeight = 2205
ClientLeft = 2085
ClientTop = 1920
ClientWidth = 5430
Height = 2610
Left = 2025
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2205
ScaleWidth = 5430
Top = 1575
Width = 5550
Begin CommandButton Command1
Caption = "Close"
Default = -1 'True
Height = 336
Left = 4164
TabIndex = 6
Top = 1776
Width = 1140
End
Begin Label FileMethod
BackColor = &H00C0C0C0&
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 240
Left = 1848
TabIndex = 7
Top = 1404
Width = 3372
End
Begin Label FileTime
BackColor = &H00C0C0C0&
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 240
Left = 1848
TabIndex = 8
Top = 1140
Width = 3360
End
Begin Label FileDate
BackColor = &H00C0C0C0&
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 240
Left = 1848
TabIndex = 12
Top = 876
Width = 3348
End
Begin Label FileCompSize
BackColor = &H00C0C0C0&
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 240
Left = 1848
TabIndex = 11
Top = 624
Width = 3336
End
Begin Label FileSize
BackColor = &H00C0C0C0&
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 240
Left = 1848
TabIndex = 10
Top = 372
Width = 3348
End
Begin Label FileName
BackColor = &H00C0C0C0&
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 240
Left = 1848
TabIndex = 9
Top = 120
Width = 3336
End
Begin Label Label6
BackColor = &H00C0C0C0&
Caption = "Compression method:"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 216
Left = 96
TabIndex = 5
Top = 1404
Width = 1668
End
Begin Label Label5
BackColor = &H00C0C0C0&
Caption = "Last modification time:"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 216
Left = 96
TabIndex = 4
Top = 1152
Width = 1656
End
Begin Label Label4
BackColor = &H00C0C0C0&
Caption = "Last modification date:"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 216
Left = 96
TabIndex = 3
Top = 888
Width = 1680
End
Begin Label Label3
BackColor = &H00C0C0C0&
Caption = "Compression rate:"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 216
Left = 96
TabIndex = 2
Top = 636
Width = 1500
End
Begin Label Label2
BackColor = &H00C0C0C0&
Caption = "Original size:"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 216
Left = 96
TabIndex = 1
Top = 384
Width = 1188
End
Begin Label Label1
BackColor = &H00C0C0C0&
Caption = "File name:"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 216
Left = 96
TabIndex = 0
Top = 132
Width = 1176
End
End
Sub Command1_Click ()
Unload form2
End Sub
Sub Form_Load ()
Dim StrInfos As String
Dim StrLabel As String
'You can use 3 different methods to retrieve a Zip file infos:
'Form1.VBZip1.GetFileInfos = Left$(Form1.VBFList1.ListString(CurrentIndex), InStr(1, Form1.VBFList1.ListString(CurrentIndex), ";") - 1)
'StrInfos$ = Form1.VBZip1.FileInfos
'
'Or (this method is not as fast as the next one):
'StrInfos$ = Form1.VBZip1.ZFileFullInfos(CurrentIndex)
'
'StrBack$ = StrInfos$
'szTestChar$ = ";"
'a% = InStr(1, StrInfos$, szTestChar$)
'StrLabel$ = Left$(StrInfos$, a% - 1)
'FileName.Caption = StrLabel$
'
'StrInfos$ = Mid$(StrBack$, a% + 1, InStr(a% + 1, StrBack$, ";") - (a% + 1))
'FileSize.Caption = StrInfos$
'a% = InStr(a% + 1, StrBack$, szTestChar$)
'StrInfos$ = Mid$(StrBack$, a% + 1, InStr(a% + 1, StrBack$, ";") - (a% + 1))
'FileCompSize.Caption = StrInfos$
'a% = InStr(a% + 1, StrBack$, szTestChar$)
'StrInfos$ = Mid$(StrBack$, a% + 1, InStr(a% + 1, StrBack$, ";") - (a% + 1))
'FileDate.Caption = StrInfos$
'a% = InStr(a% + 1, StrBack$, szTestChar$)
'StrInfos$ = Mid$(StrBack$, a% + 1, InStr(a% + 1, StrBack$, ";") - (a% + 1))
'FileTime.Caption = StrInfos$
'a% = InStr(a% + 1, StrBack$, szTestChar$)
'StrInfos$ = Mid$(StrBack$, a% + 1, 1)
'StrLabel$ = StrInfos$
'If StrLabel$ = "0" Then
' FileMethod.Caption = "0 - Stored"
'ElseIf (StrLabel$ = "1") Then
' FileMethod.Caption = "1 - Shrunk"
'ElseIf (StrLabel$ = "2") Or (StrLabel$ = "3") Or (StrLabel$ = "4") Or (StrLabel$ = "5") Then
' FileMethod.Caption = "2,3,4,5 - Reduce"
'ElseIf (StrLabel$ = "6") Then
' FileMethod.Caption = "6 - Implode"
'ElseIf (StrLabel$ = "7") Then
' FileMethod.Caption = "7 - Token"
'ElseIf (StrLabel$ = "8") Then
' FileMethod.Caption = "8 - Deflate"
'ElseIf (StrLabel$ = "9") Then
' FileMethod.Caption = "9 - Unknown (not available)"
'ElseIf (StrLabel$ = "10") Then
' FileMethod.Caption = "10 - Error in the Zip file"
'End If
'This new method use the ZipList infos
Form1.VBZip1.ZListIndex = CurrentIndex
StrBack$ = StrInfos$
szTestChar$ = ";"
FileName.Caption = Form1.VBZip1.ZListDir + Form1.VBZip1.ZListName
FileSize.Caption = Str$(Form1.VBZip1.ZListOriginalSize) + " b."
FileCompSize.Caption = Str$(Form1.VBZip1.ZListRate) + " %"
FileDate.Caption = Str$(Form1.VBZip1.ZListMonth) + "/" + Str$(Form1.VBZip1.ZListDay) + "/" + Str$(Form1.VBZip1.ZListYear)
FileTime.Caption = Str$(Form1.VBZip1.ZListHour) + ":" + Str$(Form1.VBZip1.ZListMin)
StrLabel$ = Str$(Form1.VBZip1.ZListMethod)
StrLabel$ = Trim$(StrLabel$)
If StrLabel$ = "0" Then
FileMethod.Caption = "0 - Stored"
ElseIf (StrLabel$ = "1") Then
FileMethod.Caption = "1 - Shrunk"
ElseIf (StrLabel$ = "2") Or (StrLabel$ = "3") Or (StrLabel$ = "4") Or (StrLabel$ = "5") Then
FileMethod.Caption = "2,3,4,5 - Reduce"
ElseIf (StrLabel$ = "6") Then
FileMethod.Caption = "6 - Implode"
ElseIf (StrLabel$ = "7") Then
FileMethod.Caption = "7 - Token"
ElseIf (StrLabel$ = "8") Then
FileMethod.Caption = "8 - Deflate"
ElseIf (StrLabel$ = "9") Then
FileMethod.Caption = "9 - Unknown (not available)"
ElseIf (StrLabel$ = "10") Then
FileMethod.Caption = "10 - Error in the Zip file"
End If
End Sub