home *** CD-ROM | disk | FTP | other *** search
/ Software Recommendations - 1998 Season 1 / DNBCD4.iso / develop / lib / addzip / ADDZIP.ZIP / VB / QUICKZIP / QUICKZIP.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-08-15  |  20.7 KB  |  611 lines

  1. VERSION 2.00
  2. Begin Form frmQuickZIP 
  3.    BackColor       =   &H00FFFFFF&
  4.    Caption         =   "QuickZIP"
  5.    ClientHeight    =   3645
  6.    ClientLeft      =   2910
  7.    ClientTop       =   2715
  8.    ClientWidth     =   6840
  9.    Height          =   4335
  10.    Icon            =   QUICKZIP.FRX:0000
  11.    Left            =   2850
  12.    LinkTopic       =   "Form1"
  13.    ScaleHeight     =   243
  14.    ScaleMode       =   3  'Pixel
  15.    ScaleWidth      =   456
  16.    Top             =   2085
  17.    Width           =   6960
  18.    Begin PictureBox picToolBar 
  19.       BackColor       =   &H00C0C0C0&
  20.       BorderStyle     =   0  'None
  21.       Height          =   2055
  22.       Left            =   480
  23.       ScaleHeight     =   137
  24.       ScaleMode       =   3  'Pixel
  25.       ScaleWidth      =   297
  26.       TabIndex        =   4
  27.       Top             =   240
  28.       Width           =   4455
  29.       Begin PictureBox picTool 
  30.          AutoSize        =   -1  'True
  31.          BorderStyle     =   0  'None
  32.          Height          =   495
  33.          Index           =   4
  34.          Left            =   3120
  35.          ScaleHeight     =   495
  36.          ScaleWidth      =   615
  37.          TabIndex        =   9
  38.          Top             =   120
  39.          Width           =   615
  40.       End
  41.       Begin PictureBox picTool 
  42.          AutoSize        =   -1  'True
  43.          BorderStyle     =   0  'None
  44.          Height          =   495
  45.          Index           =   3
  46.          Left            =   2400
  47.          ScaleHeight     =   495
  48.          ScaleWidth      =   615
  49.          TabIndex        =   8
  50.          Top             =   120
  51.          Width           =   615
  52.       End
  53.       Begin PictureBox picTool 
  54.          AutoSize        =   -1  'True
  55.          BorderStyle     =   0  'None
  56.          Height          =   495
  57.          Index           =   2
  58.          Left            =   1680
  59.          ScaleHeight     =   495
  60.          ScaleWidth      =   615
  61.          TabIndex        =   7
  62.          Top             =   120
  63.          Width           =   615
  64.       End
  65.       Begin PictureBox picTool 
  66.          AutoSize        =   -1  'True
  67.          BorderStyle     =   0  'None
  68.          Height          =   495
  69.          Index           =   1
  70.          Left            =   960
  71.          ScaleHeight     =   495
  72.          ScaleWidth      =   615
  73.          TabIndex        =   6
  74.          Top             =   120
  75.          Width           =   615
  76.       End
  77.       Begin PictureBox picTool 
  78.          AutoSize        =   -1  'True
  79.          BorderStyle     =   0  'None
  80.          Height          =   495
  81.          Index           =   0
  82.          Left            =   240
  83.          ScaleHeight     =   495
  84.          ScaleWidth      =   615
  85.          TabIndex        =   5
  86.          Top             =   120
  87.          Width           =   615
  88.       End
  89.       Begin Image imgButtonDown 
  90.          Height          =   480
  91.          Index           =   4
  92.          Left            =   3120
  93.          Picture         =   QUICKZIP.FRX:0302
  94.          Top             =   1200
  95.          Width           =   480
  96.       End
  97.       Begin Image imgButtonDown 
  98.          Height          =   480
  99.          Index           =   3
  100.          Left            =   2400
  101.          Picture         =   QUICKZIP.FRX:0604
  102.          Top             =   1200
  103.          Width           =   480
  104.       End
  105.       Begin Image imgButtonDown 
  106.          Height          =   480
  107.          Index           =   2
  108.          Left            =   1680
  109.          Picture         =   QUICKZIP.FRX:0906
  110.          Top             =   1440
  111.          Width           =   480
  112.       End
  113.       Begin Image imgButtonUp 
  114.          Height          =   480
  115.          Index           =   4
  116.          Left            =   3120
  117.          Picture         =   QUICKZIP.FRX:0C08
  118.          Top             =   720
  119.          Width           =   480
  120.       End
  121.       Begin Image imgButtonUp 
  122.          Height          =   480
  123.          Index           =   3
  124.          Left            =   2400
  125.          Picture         =   QUICKZIP.FRX:0F0A
  126.          Top             =   720
  127.          Width           =   480
  128.       End
  129.       Begin Image imgButtonUp 
  130.          Height          =   480
  131.          Index           =   2
  132.          Left            =   1320
  133.          Picture         =   QUICKZIP.FRX:120C
  134.          Top             =   720
  135.          Width           =   480
  136.       End
  137.       Begin Image imgButtonDown 
  138.          Height          =   480
  139.          Index           =   1
  140.          Left            =   960
  141.          Picture         =   QUICKZIP.FRX:150E
  142.          Top             =   1440
  143.          Width           =   480
  144.       End
  145.       Begin Image imgButtonUp 
  146.          Height          =   480
  147.          Index           =   1
  148.          Left            =   720
  149.          Picture         =   QUICKZIP.FRX:1810
  150.          Top             =   720
  151.          Width           =   480
  152.       End
  153.       Begin Image imgButtonDown 
  154.          Height          =   480
  155.          Index           =   0
  156.          Left            =   240
  157.          Picture         =   QUICKZIP.FRX:1B12
  158.          Top             =   1440
  159.          Width           =   480
  160.       End
  161.       Begin Image imgButtonUp 
  162.          Height          =   480
  163.          Index           =   0
  164.          Left            =   240
  165.          Picture         =   QUICKZIP.FRX:1E14
  166.          Top             =   720
  167.          Width           =   480
  168.       End
  169.    End
  170.    Begin PictureBox picStatusBar 
  171.       BackColor       =   &H00C0C0C0&
  172.       BorderStyle     =   0  'None
  173.       Height          =   495
  174.       Left            =   120
  175.       ScaleHeight     =   33
  176.       ScaleMode       =   3  'Pixel
  177.       ScaleWidth      =   81
  178.       TabIndex        =   1
  179.       Top             =   2760
  180.       Width           =   1215
  181.       Begin Label lblStatusBar 
  182.          BackColor       =   &H00C0C0C0&
  183.          Caption         =   "Label1"
  184.          FontBold        =   0   'False
  185.          FontItalic      =   0   'False
  186.          FontName        =   "MS Sans Serif"
  187.          FontSize        =   8.25
  188.          FontStrikethru  =   0   'False
  189.          FontUnderline   =   0   'False
  190.          Height          =   255
  191.          Left            =   120
  192.          TabIndex        =   3
  193.          Top             =   120
  194.          Width           =   1215
  195.       End
  196.    End
  197.    Begin TextBox txtZIP 
  198.       Height          =   285
  199.       Left            =   120
  200.       TabIndex        =   2
  201.       Text            =   "Text1"
  202.       Top             =   3120
  203.       Visible         =   0   'False
  204.       Width           =   3255
  205.    End
  206.    Begin ColumnListbox colArchive 
  207.       Height          =   2655
  208.       Left            =   840
  209.       TabIndex        =   0
  210.       Top             =   2160
  211.       Width           =   4530
  212.    End
  213.    Begin Menu mnuArchive 
  214.       Caption         =   "&Archive"
  215.       Begin Menu mnuArchiveNew 
  216.          Caption         =   "&New"
  217.       End
  218.       Begin Menu mnuArchiveOpen 
  219.          Caption         =   "&Open..."
  220.       End
  221.       Begin Menu mnuArchiveSep1 
  222.          Caption         =   "-"
  223.       End
  224.       Begin Menu mnuArchiveExit 
  225.          Caption         =   "E&xit"
  226.       End
  227.    End
  228.    Begin Menu mnuOptions 
  229.       Caption         =   "&Options"
  230.       Begin Menu mnuOptionsCompression 
  231.          Caption         =   "&Compression..."
  232.          Begin Menu mnuOptionsCompressionLevel 
  233.             Caption         =   "N&one"
  234.             Index           =   0
  235.          End
  236.          Begin Menu mnuOptionsCompressionLevel 
  237.             Caption         =   "&Minimum"
  238.             Index           =   1
  239.          End
  240.          Begin Menu mnuOptionsCompressionLevel 
  241.             Caption         =   "&Normal"
  242.             Checked         =   -1  'True
  243.             Index           =   2
  244.          End
  245.          Begin Menu mnuOptionsCompressionLevel 
  246.             Caption         =   "Ma&ximum"
  247.             Index           =   3
  248.          End
  249.       End
  250.       Begin Menu mnuOptionsStoreFull 
  251.          Caption         =   "Store full filename"
  252.          Checked         =   -1  'True
  253.       End
  254.       Begin Menu mnuOptionsSep1 
  255.          Caption         =   "-"
  256.       End
  257.       Begin Menu mnuOptionsExtractTo 
  258.          Caption         =   "Extract to..."
  259.       End
  260.       Begin Menu mnuOptionsSep2 
  261.          Caption         =   "-"
  262.       End
  263.       Begin Menu mnuOptionsOnTop 
  264.          Caption         =   "Always on top"
  265.          Checked         =   -1  'True
  266.       End
  267.    End
  268.    Begin Menu mnuHelp 
  269.       Caption         =   "&Help"
  270.       Begin Menu mnuHelpAbout 
  271.          Caption         =   "About..."
  272.       End
  273.    End
  274.    Begin Menu mnuPopUp 
  275.       Caption         =   "PopUp"
  276.       Visible         =   0   'False
  277.       Begin Menu mnuPopSelect 
  278.          Caption         =   "&Select all"
  279.          Enabled         =   0   'False
  280.          Index           =   0
  281.       End
  282.       Begin Menu mnuPopSelect 
  283.          Caption         =   "&Deselect all"
  284.          Enabled         =   0   'False
  285.          Index           =   1
  286.       End
  287.       Begin Menu mnuPopSelect 
  288.          Caption         =   "&Invert selection"
  289.          Enabled         =   0   'False
  290.          Index           =   2
  291.       End
  292.       Begin Menu mnuPopSep1 
  293.          Caption         =   "-"
  294.       End
  295.       Begin Menu mnuPopExtract 
  296.          Caption         =   "&Extract"
  297.          Enabled         =   0   'False
  298.       End
  299.       Begin Menu mnuPopView 
  300.          Caption         =   "&View"
  301.          Enabled         =   0   'False
  302.       End
  303.       Begin Menu mnuPopDelete 
  304.          Caption         =   "D&elete"
  305.          Enabled         =   0   'False
  306.       End
  307.    End
  308. Option Explicit
  309. Sub colArchive_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  310.     If (Button = 2) Then
  311.         If (colArchive.ListCount > 0) Then mnuPopSelect(0).Enabled = True
  312.         If (colArchive.SelectedCount > 0) Then
  313.             mnuPopExtract.Enabled = True
  314.             mnuPopDelete.Enabled = True
  315.             mnuPopView.Enabled = True
  316.             mnuPopSelect(1).Enabled = True
  317.             mnuPopSelect(2).Enabled = True
  318.         End If
  319.         PopupMenu mnuPopUp
  320.     End If
  321. End Sub
  322. Sub Form_Activate ()
  323.     InitializeTips
  324.   AddTip Me.picTool(0).hWnd, "Create a new archive"
  325.   AddTip Me.picTool(1).hWnd, "Open an existing archive"
  326.   AddTip Me.picTool(2).hWnd, "Extract the selected file(s)"
  327.   AddTip Me.picTool(3).hWnd, "View the selected file"
  328.   AddTip Me.picTool(4).hWnd, "Delete the selected file(s)"
  329. End Sub
  330. Sub Form_Load ()
  331.     Dim I As Integer
  332.     For I = 0 To 4
  333.       picTool(I).Picture = imgButtonUp(I).Picture
  334.     Next I
  335.     picTool(0).Move 4, 2
  336.     picTool(1).Move picTool(0).Left + 32, 2
  337.     picTool(2).Move picTool(1).Left + 32 + 6, 2
  338.     picTool(3).Move picTool(2).Left + 32, 2
  339.     picTool(4).Move picTool(3).Left + 32, 2
  340.     g_cExtract = App.Path
  341.     colArchive.ColumnCount = 5
  342.     colArchive.ColumnHeading(0) = "Filename"
  343.     colArchive.ColumnWidth(0) = TextWidth("WWWWWWWW.WWW")
  344.     colArchive.ColumnHeading(1) = "Size"
  345.     colArchive.ColumnJustification(1) = TA_RIGHT
  346.     colArchive.ColumnAutoSort(1) = SORT_NUMERIC
  347.     colArchive.ColumnHeading(2) = "Compressed"
  348.     colArchive.ColumnJustification(2) = TA_RIGHT
  349.     colArchive.ColumnAutoSort(2) = SORT_NUMERIC
  350.     colArchive.ColumnHeading(3) = "Ratio"
  351.     colArchive.ColumnWidth(3) = TextWidth("Ratio") + 5
  352.     colArchive.ColumnJustification(3) = TA_RIGHT
  353.     colArchive.ColumnAutoSort(3) = SORT_NUMERIC
  354.     colArchive.ColumnHeading(4) = "Path"
  355.     colArchive.MultiSelect = True
  356.     If (Command$ <> "") Then ListArchiveContents (Command$)
  357.     UpdateStatusBar
  358.     ' initialise the addZIP libraries
  359.     addZIP_Initialise
  360.     addUNZIP_Initialise
  361.     I = addZIP_SetParentWindowHandle(Me.hWnd)
  362.     I = addUNZIP_SetParentWindowHandle(Me.hWnd)
  363.     I = addZIP_SetWindowHandle(txtZIP.hWnd)
  364.     I = addUNZIP_SetWindowHandle(txtZIP.hWnd)
  365.     '
  366.     Form_Colour Me
  367.     Me.Show
  368.     SpyMessages
  369. End Sub
  370. Sub Form_Resize ()
  371.     Dim I As Integer
  372.     If (Me.WindowState = 1) Then Exit Sub
  373.     ' resize the tool bar
  374.     picToolBar.Move 0, 0, Me.ScaleWidth, 36
  375.     ' resize the column list box
  376.     colArchive.Move 0, 36, Me.ScaleWidth, Me.ScaleHeight - (TextHeight("lq") + 10) - 36
  377.     ' resize the status bar
  378.     picStatusBar.Move 0, colArchive.Height + 36, colArchive.Width, TextHeight("lq") + 10
  379.     ' set window position - needed when windows is minimised
  380.     If (mnuOptionsOnTop.Checked = True) Then
  381.         I = SetWindowPos(Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)
  382.     End If
  383. End Sub
  384. Sub Form_Unload (Cancel As Integer)
  385.   Unload TTips
  386.   End ' the program is closing
  387. End Sub
  388. Sub mnuArchiveExit_Click ()
  389.     End
  390. End Sub
  391. Sub mnuArchiveNew_Click ()
  392.     Dim cNew As String
  393.     cNew = NewFile()
  394.     If (cNew <> "") Then ListArchiveContents (cNew)
  395. End Sub
  396. Sub mnuArchiveOpen_Click ()
  397.   Dim cNew As String
  398.   cNew = OpenFile()
  399.   If (cNew <> "") Then ListArchiveContents (cNew)
  400. End Sub
  401. Sub mnuHelpAbout_Click ()
  402.   frmAbout.Show 1
  403. End Sub
  404. Sub mnuOptionsCompressionLevel_Click (Index As Integer)
  405.     Dim I As Integer
  406.     For I = 0 To 3
  407.         mnuOptionsCompressionLevel(I).Checked = False
  408.     Next I
  409.     mnuOptionsCompressionLevel(Index).Checked = True
  410. End Sub
  411. Sub mnuOptionsExtractTo_Click ()
  412.     Load frmUtility
  413.     frmUtility.Caption = "Set extract directory"
  414.     frmUtility.txtInput.Text = g_cExtract
  415.     'frmUtility.txtInput.SetFocus
  416.     frmUtility.txtInput.SelStart = 0
  417.     frmUtility.txtInput.SelLength = Len(g_cExtract)
  418.     frmUtility.Show 1
  419.     If (g_cTemp <> "") Then g_cExtract = g_cTemp
  420. End Sub
  421. Sub mnuOptionsOnTop_Click ()
  422.     Dim I As Integer
  423.     mnuOptionsOnTop.Checked = Not mnuOptionsOnTop.Checked
  424.     If (mnuOptionsOnTop.Checked = True) Then
  425.         I% = SetWindowPos(Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)
  426.     Else
  427.         I% = SetWindowPos(Me.hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, FLAGS)
  428.     End If
  429. End Sub
  430. Sub mnuOptionsStoreFull_Click ()
  431.     mnuOptionsStoreFull.Checked = Not mnuOptionsStoreFull.Checked
  432. End Sub
  433. Sub mnuPopDelete_Click ()
  434.     Dim I As Integer
  435.     Dim J As Integer
  436.     Dim cMessage As String
  437.     Dim cFilename As String
  438.     cMessage = "Do you want to delete the "
  439.     cMessage = cMessage & Format$(colArchive.SelectedCount)
  440.     cMessage = cMessage & " selected files from "
  441.     cMessage = cMessage & g_cArchiveName & "?"
  442.     If (MsgBox(cMessage, 36, "Confirm") = 6) Then
  443.       For J = 1 To colArchive.ListCount
  444.         If (colArchive.Selected(J - 1) <> False) Then
  445.           I = addZIP_ArchiveName(g_cArchiveName)
  446.           cFilename = GetPiece((colArchive.List(J - 1)), Chr$(9), 5)
  447.           If (cFilename <> "") Then cFilename = cFilename & "/"
  448.           cFilename = cFilename & GetPiece((colArchive.List(J - 1)), Chr$(9), 1)
  449.           I = addZIP_Include(cFilename)
  450.           I = addZIP_Delete(True)
  451.           I = addZIP()
  452.         End If
  453.       Next J
  454.     End If
  455.     ListArchiveContents g_cArchiveName
  456. End Sub
  457. Sub mnuPopExtract_Click ()
  458.     Dim I As Integer
  459.     Dim J As Integer
  460.     Dim cMessage As String
  461.     Dim cFilename As String
  462.     cMessage = "Do you want to extract the "
  463.     cMessage = cMessage & Format$(colArchive.SelectedCount)
  464.     cMessage = cMessage & " selected files to "
  465.     cMessage = cMessage & g_cExtract & "?"
  466.     If (MsgBox(cMessage, 36, "Confirm") = 6) Then
  467.       For J = 1 To colArchive.ListCount
  468.         If (colArchive.Selected(J - 1) <> False) Then
  469.           I = addUNZIP_ArchiveName(g_cArchiveName)
  470.           cFilename = GetPiece((colArchive.List(J - 1)), Chr$(9), 5)
  471.           If (cFilename <> "") Then cFilename = cFilename & "/"
  472.           cFilename = cFilename & GetPiece((colArchive.List(J - 1)), Chr$(9), 1)
  473.           Debug.Print "Doing " & cFilename
  474.           I = addUNZIP_Include(cFilename)
  475.           I = addUNZIP_ExtractTo(g_cExtract)
  476.           I = addUNZIP()
  477.           Debug.Print I
  478.         End If
  479.       Next J
  480.     End If
  481. End Sub
  482. Sub mnuPopSelect_Click (Index As Integer)
  483.   Dim I As Integer
  484.   Select Case Index
  485.     Case 0 ' select all
  486.       For I = 1 To colArchive.ListCount
  487.         colArchive.Selected(I - 1) = True
  488.       Next I
  489.     Case 1 ' deselect all
  490.       For I = 1 To colArchive.ListCount
  491.         colArchive.Selected(I - 1) = False
  492.       Next I
  493.     Case 2 ' invert selection
  494.       For I = 1 To colArchive.ListCount
  495.         colArchive.Selected(I - 1) = Not colArchive.Selected(I - 1)
  496.       Next I
  497.   End Select
  498. End Sub
  499. Sub mnuPopView_Click ()
  500.     Dim I As Integer
  501.     Dim J As Integer
  502.     Dim cMessage As String
  503.     Dim cFilename As String
  504.     Dim cBuffer As String
  505.     Dim EndValue As Integer
  506.     For J = 1 To colArchive.ListCount
  507.       If (colArchive.Selected(J - 1) <> False) Then
  508.           I = addUNZIP_ArchiveName(g_cArchiveName)
  509.           cFilename = GetPiece((colArchive.List(J - 1)), Chr$(9), 5)
  510.           If (cFilename <> "") Then cFilename = cFilename & "/"
  511.           cFilename = cFilename & GetPiece((colArchive.List(J - 1)), Chr$(9), 1)
  512.           I = addUNZIP_Include(cFilename)
  513.           cBuffer = Space$(2100)
  514.           I = addUNZIP_ToMemory(cBuffer, 2000)
  515.           I = addUNZIP()
  516.           EndValue = InStr(cBuffer, Chr$(0))
  517.           cBuffer = Left$(cBuffer, EndValue - 1)
  518.           MsgBox cBuffer, 0, "Viewing " & cFilename
  519.       End If
  520.     Next J
  521. End Sub
  522. Sub picStatusBar_Paint ()
  523.     ' Paint 3D effect of Status Bar
  524.     picStatusBar.Line (0, 0)-(picStatusBar.ScaleWidth, 0), RGB(255, 255, 255)
  525.     picStatusBar.Line (0, picStatusBar.ScaleHeight - 2)-(picStatusBar.ScaleWidth, picStatusBar.ScaleHeight - 2), RGB(128, 128, 128)
  526.     picStatusBar.Line (0, picStatusBar.ScaleHeight - 1)-(picStatusBar.ScaleWidth, picStatusBar.ScaleHeight - 1), RGB(0, 0, 0)
  527.     ' Resize label for status bar text
  528.     lblStatusBar.Move 5, 5, picStatusBar.ScaleWidth - 10, TextHeight("lq")
  529.     ' Paint 3D effect for status bar text
  530.     picStatusBar.Line (4, 4)-Step(lblStatusBar.Width + 2, 0), RGB(128, 128, 128)
  531.     picStatusBar.Line (4, 4)-Step(0, lblStatusBar.Height + 2), RGB(128, 128, 128)
  532.     picStatusBar.Line (4, lblStatusBar.Height + 6)-Step(lblStatusBar.Width + 2, 0), RGB(255, 255, 255)
  533.     picStatusBar.Line (4 + lblStatusBar.Width + 2, 4)-Step(0, lblStatusBar.Height + 2), RGB(255, 255, 255)
  534. End Sub
  535. Sub picStatusBar_Resize ()
  536.     ' Need to refresh the picture box because reducing its size
  537.     ' doesnt generate a paint event
  538.     picStatusBar.Refresh
  539. End Sub
  540. Sub picTool_Click (Index As Integer)
  541.   Select Case Index
  542.     Case 0
  543.       mnuArchiveNew_Click
  544.     Case 1
  545.       mnuArchiveOpen_Click
  546.     Case 2
  547.       If (mnuPopExtract.Enabled) Then
  548.         mnuPopExtract_Click
  549.       End If
  550.     Case 3
  551.       If (mnuPopView.Enabled) Then
  552.         mnuPopView_Click
  553.       End If
  554.     Case 4
  555.       If (mnuPopDelete.Enabled) Then
  556.         mnuPopDelete_Click
  557.       End If
  558.   End Select
  559. End Sub
  560. Sub picTool_MouseDown (Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  561.   picTool(Index).Picture = imgButtonDown(Index).Picture
  562. End Sub
  563. Sub picTool_MouseUp (Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  564.   picTool(Index).Picture = imgButtonUp(Index).Picture
  565. End Sub
  566. Sub picToolBar_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  567.   DisplayTips
  568. End Sub
  569. Sub txtZIP_Change ()
  570.     Dim cAdditem As String
  571.     Dim lSize As Long
  572.     Debug.Print txtZIP.Text
  573.     Select Case GetAction((txtZIP.Text))
  574.         Case AM_SEARCHING
  575.         Case AM_ZIPCOMMENT
  576.         Case AM_ZIPPING
  577.             cAdditem = "Zipping " & GetFileName((txtZIP.Text))
  578.             cAdditem = cAdditem & " - " & Str$(GetFileCompressionRatio((txtZIP.Text))) & "%"
  579.             lblStatusBar.Caption = cAdditem
  580.         Case AM_ZIPPED
  581.         Case AM_UNZIPPING
  582.             cAdditem = "Unzipping " & GetFileName((txtZIP.Text))
  583.             cAdditem = cAdditem & " - " & Str$(GetFileCompressionRatio((txtZIP.Text))) & "%"
  584.             lblStatusBar.Caption = cAdditem
  585.         Case AM_UNZIPPED
  586.         Case AM_TESTING
  587.         Case AM_TESTED
  588.         Case AM_DELETING
  589.         Case AM_DELETED
  590.         Case AM_DISKCHANGE
  591.         Case AM_VIEW
  592.             cAdditem = GetPiece((txtZIP.Text), "|", 5) & Chr$(9)
  593.             lSize = Val(GetPiece((txtZIP.Text), "|", 6))
  594.             g_lSize = g_lSize + lSize
  595.             cAdditem = cAdditem & Str$(lSize) & Chr$(9)
  596.             cAdditem = cAdditem & GetPiece((txtZIP.Text), "|", 7) & Chr$(9)
  597.             cAdditem = cAdditem & GetPiece((txtZIP.Text), "|", 8) & "%" & Chr$(9)
  598.             cAdditem = cAdditem & GetPiece((txtZIP.Text), "|", 4)
  599.             colArchive.AddItem cAdditem
  600.             g_iCount = g_iCount + 1
  601.         Case AM_ERROR
  602.         Case AM_WARNING
  603.         Case AM_QUERYOVERWRITE
  604.         Case AM_COPYING
  605.         Case AM_COPIED
  606.         Case Else
  607.             Debug.Print txtZIP.Text
  608.     End Select
  609.     DoEvents
  610. End Sub
  611.