home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Unleashed / Visual_Basic_4_Unleashed_SAMS_Publishing_1995.iso / mabry / zipinf12 / sample / zsample.frm (.txt) next >
Encoding:
Visual Basic Form  |  1993-12-20  |  6.7 KB  |  234 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. Option Explicit
  177. Sub Form_Load ()
  178.     ZSample.Left = (Screen.Width - ZSample.Width) / 2
  179.     ZSample.Top = (Screen.Height - ZSample.Height) / 2
  180. End Sub
  181. Sub Form_Unload (Cancel As Integer)
  182.     End
  183. End Sub
  184. Sub List1_Click ()
  185.     Dim I As Integer
  186.     If List1.ListIndex < 0 Then
  187.         ItemCompressed = ""
  188.         ItemCRC = ""
  189.         ItemDate = ""
  190.         ItemFileComment = ""
  191.         ItemFileName = ""
  192.         ItemMethod = ""
  193.         ItemTime = ""
  194.         ItemUncompressed = ""
  195.     Else
  196.         I = List1.ItemData(List1.ListIndex)
  197.         ItemCompressed = Format$(ZipInfo1.ItemCompressed(I)) + " bytes"
  198.         ItemCRC = Hex$(ZipInfo1.ItemCRC(I))
  199.         ItemDate = ZipInfo1.ItemDate(I)
  200.         ItemFileComment = ZipInfo1.ItemFileComment(I)
  201.         ItemFileName = ZipInfo1.ItemFileName(I)
  202.         Select Case ZipInfo1.ItemMethod(I)
  203.             Case 0
  204.                 ItemMethod = "None"
  205.             Case 1
  206.                 ItemMethod = "Shrunk"
  207.             Case 2 - 5
  208.                 ItemMethod = "Reduced"
  209.             Case 6
  210.                 ItemMethod = "Imploded"
  211.             Case 7
  212.                 ItemMethod = "Tokenized"
  213.             Case 8
  214.                 ItemMethod = "Deflated"
  215.             Case Else
  216.                 ItemMethod = "Unknown"
  217.         End Select
  218.         ItemTime = ZipInfo1.ItemTime(I)
  219.         ItemUncompressed = Format$(ZipInfo1.ItemUncompressed(I)) + " bytes"
  220.     End If
  221. End Sub
  222. Sub MenuFileExit_Click ()
  223.     End
  224. End Sub
  225. Sub MenuFileOpen_Click ()
  226.     Dim I As Integer
  227.     ZSample2.Show 1
  228.     List1.Clear
  229.     For I = 0 To ZipInfo1.ListCount - 1
  230.         List1.AddItem ZipInfo1.ItemFileName(I)
  231.         List1.ItemData(List1.NewIndex) = I
  232.     Next I
  233. End Sub
  234.