home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 26 / CD_ASCQ_26_1295.iso / vrac / msmega.zip / ZIPINFSA.ZIP / ZSAMPLE.FRM next >
Text File  |  1993-12-20  |  7KB  |  249 lines

  1. VERSION 2.00
  2. Begin Form ZSample 
  3.    BorderStyle     =   3  'Fixed Double
  4.    Caption         =   "ZipInf Sample"
  5.    ClientHeight    =   2685
  6.    ClientLeft      =   1530
  7.    ClientTop       =   2460
  8.    ClientWidth     =   7215
  9.    Height          =   3375
  10.    Left            =   1470
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    ScaleHeight     =   2685
  14.    ScaleWidth      =   7215
  15.    Top             =   1830
  16.    Width           =   7335
  17.    Begin ListBox List1 
  18.       Height          =   1980
  19.       Left            =   240
  20.       Sorted          =   -1  'True
  21.       TabIndex        =   0
  22.       Top             =   480
  23.       Width           =   2055
  24.    End
  25.    Begin MabryZipInfo ZipInfo1 
  26.       DateFormat      =   ""
  27.       Left            =   1920
  28.       Top             =   0
  29.    End
  30.    Begin Label ItemMethod 
  31.       Alignment       =   1  'Right Justify
  32.       Height          =   255
  33.       Left            =   4560
  34.       TabIndex        =   18
  35.       Top             =   1680
  36.       Width           =   2415
  37.    End
  38.    Begin Label Label12 
  39.       Caption         =   "ItemMethod:"
  40.       Height          =   255
  41.       Left            =   2520
  42.       TabIndex        =   17
  43.       Top             =   1680
  44.       Width           =   1935
  45.    End
  46.    Begin Label ItemTime 
  47.       Alignment       =   1  'Right Justify
  48.       Height          =   255
  49.       Left            =   4560
  50.       TabIndex        =   16
  51.       Top             =   1920
  52.       Width           =   2415
  53.    End
  54.    Begin Label Label10 
  55.       Caption         =   "ItemTime:"
  56.       Height          =   255
  57.       Left            =   2520
  58.       TabIndex        =   15
  59.       Top             =   1920
  60.       Width           =   1935
  61.    End
  62.    Begin Label ItemUncompressed 
  63.       Alignment       =   1  'Right Justify
  64.       Height          =   255
  65.       Left            =   4560
  66.       TabIndex        =   14
  67.       Top             =   2160
  68.       Width           =   2415
  69.    End
  70.    Begin Label Label8 
  71.       Caption         =   "ItemUncompressed:"
  72.       Height          =   255
  73.       Left            =   2520
  74.       TabIndex        =   13
  75.       Top             =   2160
  76.       Width           =   1935
  77.    End
  78.    Begin Label ItemDate 
  79.       Alignment       =   1  'Right Justify
  80.       Height          =   255
  81.       Left            =   4560
  82.       TabIndex        =   12
  83.       Top             =   960
  84.       Width           =   2415
  85.    End
  86.    Begin Label Label7 
  87.       Caption         =   "ItemDate:"
  88.       Height          =   255
  89.       Left            =   2520
  90.       TabIndex        =   11
  91.       Top             =   960
  92.       Width           =   1935
  93.    End
  94.    Begin Label ItemFileComment 
  95.       Alignment       =   1  'Right Justify
  96.       Height          =   255
  97.       Left            =   4560
  98.       TabIndex        =   10
  99.       Top             =   1200
  100.       Width           =   2415
  101.    End
  102.    Begin Label Label5 
  103.       Caption         =   "ItemFileComment:"
  104.       Height          =   255
  105.       Left            =   2520
  106.       TabIndex        =   9
  107.       Top             =   1200
  108.       Width           =   1935
  109.    End
  110.    Begin Label ItemCompressed 
  111.       Alignment       =   1  'Right Justify
  112.       Height          =   255
  113.       Left            =   4560
  114.       TabIndex        =   8
  115.       Top             =   480
  116.       Width           =   2415
  117.    End
  118.    Begin Label Label3 
  119.       Caption         =   "ItemCompressed:"
  120.       Height          =   255
  121.       Left            =   2520
  122.       TabIndex        =   7
  123.       Top             =   480
  124.       Width           =   1935
  125.    End
  126.    Begin Label ItemCRC 
  127.       Alignment       =   1  'Right Justify
  128.       Height          =   255
  129.       Left            =   4560
  130.       TabIndex        =   6
  131.       Top             =   720
  132.       Width           =   2415
  133.    End
  134.    Begin Label Label4 
  135.       Caption         =   "ItemCRC:"
  136.       Height          =   255
  137.       Left            =   2520
  138.       TabIndex        =   5
  139.       Top             =   720
  140.       Width           =   1935
  141.    End
  142.    Begin Label ItemFileName 
  143.       Alignment       =   1  'Right Justify
  144.       Height          =   255
  145.       Left            =   4560
  146.       TabIndex        =   4
  147.       Top             =   1440
  148.       Width           =   2415
  149.    End
  150.    Begin Label Label2 
  151.       Caption         =   "ItemFileName:"
  152.       Height          =   255
  153.       Left            =   2520
  154.       TabIndex        =   3
  155.       Top             =   1440
  156.       Width           =   1935
  157.    End
  158.    Begin Label Label1 
  159.       Caption         =   "Files in ZIP:"
  160.       Height          =   255
  161.       Left            =   240
  162.       TabIndex        =   1
  163.       Top             =   240
  164.       Width           =   1215
  165.    End
  166.    Begin Menu MenuFile 
  167.       Caption         =   "&File"
  168.       Begin Menu MenuFileOpen 
  169.          Caption         =   "&Open"
  170.          Shortcut        =   ^O
  171.       End
  172.       Begin Menu MenuFileExit 
  173.          Caption         =   "E&xit"
  174.       End
  175.    End
  176. End
  177. Option Explicit
  178.  
  179. Sub Form_Load ()
  180.     ZSample.Left = (Screen.Width - ZSample.Width) / 2
  181.     ZSample.Top = (Screen.Height - ZSample.Height) / 2
  182. End Sub
  183.  
  184. Sub Form_Unload (Cancel As Integer)
  185.     End
  186. End Sub
  187.  
  188. Sub List1_Click ()
  189.     Dim I As Integer
  190.  
  191.     If List1.ListIndex < 0 Then
  192.         ItemCompressed = ""
  193.         ItemCRC = ""
  194.         ItemDate = ""
  195.         ItemFileComment = ""
  196.         ItemFileName = ""
  197.         ItemMethod = ""
  198.         ItemTime = ""
  199.         ItemUncompressed = ""
  200.     Else
  201.         I = List1.ItemData(List1.ListIndex)
  202.  
  203.         ItemCompressed = Format$(ZipInfo1.ItemCompressed(I)) + " bytes"
  204.         ItemCRC = Hex$(ZipInfo1.ItemCRC(I))
  205.         ItemDate = ZipInfo1.ItemDate(I)
  206.         ItemFileComment = ZipInfo1.ItemFileComment(I)
  207.         ItemFileName = ZipInfo1.ItemFileName(I)
  208.  
  209.         Select Case ZipInfo1.ItemMethod(I)
  210.             Case 0
  211.                 ItemMethod = "None"
  212.             Case 1
  213.                 ItemMethod = "Shrunk"
  214.             Case 2 - 5
  215.                 ItemMethod = "Reduced"
  216.             Case 6
  217.                 ItemMethod = "Imploded"
  218.             Case 7
  219.                 ItemMethod = "Tokenized"
  220.             Case 8
  221.                 ItemMethod = "Deflated"
  222.             Case Else
  223.                 ItemMethod = "Unknown"
  224.         End Select
  225.  
  226.         ItemTime = ZipInfo1.ItemTime(I)
  227.         ItemUncompressed = Format$(ZipInfo1.ItemUncompressed(I)) + " bytes"
  228.     End If
  229. End Sub
  230.  
  231. Sub MenuFileExit_Click ()
  232.     End
  233. End Sub
  234.  
  235. Sub MenuFileOpen_Click ()
  236.     Dim I As Integer
  237.  
  238.  
  239.     ZSample2.Show 1
  240.  
  241.     List1.Clear
  242.  
  243.     For I = 0 To ZipInfo1.ListCount - 1
  244.         List1.AddItem ZipInfo1.ItemFileName(I)
  245.         List1.ItemData(List1.NewIndex) = I
  246.     Next I
  247. End Sub
  248.  
  249.