home *** CD-ROM | disk | FTP | other *** search
/ Programmers Heaven 2 / Programmers Heaven 2.iso / files / windows / ocx / zipinf.exe / ZIPINFS1.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-06-17  |  9.3 KB  |  306 lines

  1. VERSION 4.00
  2. Begin VB.Form ZSample 
  3.    Appearance      =   0  'Flat
  4.    BackColor       =   &H80000005&
  5.    BorderStyle     =   3  'Fixed Dialog
  6.    Caption         =   "ZipInf Sample"
  7.    ClientHeight    =   2685
  8.    ClientLeft      =   1530
  9.    ClientTop       =   2460
  10.    ClientWidth     =   7215
  11.    BeginProperty Font 
  12.       name            =   "MS Sans Serif"
  13.       charset         =   1
  14.       weight          =   700
  15.       size            =   8.25
  16.       underline       =   0   'False
  17.       italic          =   0   'False
  18.       strikethrough   =   0   'False
  19.    EndProperty
  20.    ForeColor       =   &H80000008&
  21.    Height          =   3375
  22.    Left            =   1470
  23.    LinkTopic       =   "Form1"
  24.    MaxButton       =   0   'False
  25.    ScaleHeight     =   2685
  26.    ScaleWidth      =   7215
  27.    Top             =   1830
  28.    Width           =   7335
  29.    Begin VB.ListBox List1 
  30.       Appearance      =   0  'Flat
  31.       Height          =   1980
  32.       Left            =   240
  33.       Sorted          =   -1  'True
  34.       TabIndex        =   0
  35.       Top             =   480
  36.       Width           =   2055
  37.    End
  38.    Begin ZipinfLib.ZipInfo ZipInfo1 
  39.       Left            =   1800
  40.       Top             =   0
  41.       _version        =   65539
  42.       _extentx        =   847
  43.       _extenty        =   847
  44.       _stockprops     =   64
  45.       dateformat      =   "mm/dd/yy"
  46.       filename        =   ""
  47.    End
  48.    Begin VB.Label ItemMethod 
  49.       Alignment       =   1  'Right Justify
  50.       Appearance      =   0  'Flat
  51.       BackColor       =   &H80000005&
  52.       ForeColor       =   &H80000008&
  53.       Height          =   255
  54.       Left            =   4560
  55.       TabIndex        =   2
  56.       Top             =   1680
  57.       Width           =   2415
  58.    End
  59.    Begin VB.Label Label12 
  60.       Appearance      =   0  'Flat
  61.       BackColor       =   &H80000005&
  62.       Caption         =   "ItemMethod:"
  63.       ForeColor       =   &H80000008&
  64.       Height          =   255
  65.       Left            =   2520
  66.       TabIndex        =   17
  67.       Top             =   1680
  68.       Width           =   1935
  69.    End
  70.    Begin VB.Label ItemTime 
  71.       Alignment       =   1  'Right Justify
  72.       Appearance      =   0  'Flat
  73.       BackColor       =   &H80000005&
  74.       ForeColor       =   &H80000008&
  75.       Height          =   255
  76.       Left            =   4560
  77.       TabIndex        =   16
  78.       Top             =   1920
  79.       Width           =   2415
  80.    End
  81.    Begin VB.Label Label10 
  82.       Appearance      =   0  'Flat
  83.       BackColor       =   &H80000005&
  84.       Caption         =   "ItemTime:"
  85.       ForeColor       =   &H80000008&
  86.       Height          =   255
  87.       Left            =   2520
  88.       TabIndex        =   15
  89.       Top             =   1920
  90.       Width           =   1935
  91.    End
  92.    Begin VB.Label ItemUncompressed 
  93.       Alignment       =   1  'Right Justify
  94.       Appearance      =   0  'Flat
  95.       BackColor       =   &H80000005&
  96.       ForeColor       =   &H80000008&
  97.       Height          =   255
  98.       Left            =   4560
  99.       TabIndex        =   14
  100.       Top             =   2160
  101.       Width           =   2415
  102.    End
  103.    Begin VB.Label Label8 
  104.       Appearance      =   0  'Flat
  105.       BackColor       =   &H80000005&
  106.       Caption         =   "ItemUncompressed:"
  107.       ForeColor       =   &H80000008&
  108.       Height          =   255
  109.       Left            =   2520
  110.       TabIndex        =   13
  111.       Top             =   2160
  112.       Width           =   1935
  113.    End
  114.    Begin VB.Label ItemDate 
  115.       Alignment       =   1  'Right Justify
  116.       Appearance      =   0  'Flat
  117.       BackColor       =   &H80000005&
  118.       ForeColor       =   &H80000008&
  119.       Height          =   255
  120.       Left            =   4560
  121.       TabIndex        =   12
  122.       Top             =   960
  123.       Width           =   2415
  124.    End
  125.    Begin VB.Label Label7 
  126.       Appearance      =   0  'Flat
  127.       BackColor       =   &H80000005&
  128.       Caption         =   "ItemDate:"
  129.       ForeColor       =   &H80000008&
  130.       Height          =   255
  131.       Left            =   2520
  132.       TabIndex        =   11
  133.       Top             =   960
  134.       Width           =   1935
  135.    End
  136.    Begin VB.Label ItemFileComment 
  137.       Alignment       =   1  'Right Justify
  138.       Appearance      =   0  'Flat
  139.       BackColor       =   &H80000005&
  140.       ForeColor       =   &H80000008&
  141.       Height          =   255
  142.       Left            =   4560
  143.       TabIndex        =   10
  144.       Top             =   1200
  145.       Width           =   2415
  146.    End
  147.    Begin VB.Label Label5 
  148.       Appearance      =   0  'Flat
  149.       BackColor       =   &H80000005&
  150.       Caption         =   "ItemFileComment:"
  151.       ForeColor       =   &H80000008&
  152.       Height          =   255
  153.       Left            =   2520
  154.       TabIndex        =   9
  155.       Top             =   1200
  156.       Width           =   1935
  157.    End
  158.    Begin VB.Label ItemCompressed 
  159.       Alignment       =   1  'Right Justify
  160.       Appearance      =   0  'Flat
  161.       BackColor       =   &H80000005&
  162.       ForeColor       =   &H80000008&
  163.       Height          =   255
  164.       Left            =   4560
  165.       TabIndex        =   8
  166.       Top             =   480
  167.       Width           =   2415
  168.    End
  169.    Begin VB.Label Label3 
  170.       Appearance      =   0  'Flat
  171.       BackColor       =   &H80000005&
  172.       Caption         =   "ItemCompressed:"
  173.       ForeColor       =   &H80000008&
  174.       Height          =   255
  175.       Left            =   2520
  176.       TabIndex        =   7
  177.       Top             =   480
  178.       Width           =   1935
  179.    End
  180.    Begin VB.Label ItemCRC 
  181.       Alignment       =   1  'Right Justify
  182.       Appearance      =   0  'Flat
  183.       BackColor       =   &H80000005&
  184.       ForeColor       =   &H80000008&
  185.       Height          =   255
  186.       Left            =   4560
  187.       TabIndex        =   6
  188.       Top             =   720
  189.       Width           =   2415
  190.    End
  191.    Begin VB.Label Label4 
  192.       Appearance      =   0  'Flat
  193.       BackColor       =   &H80000005&
  194.       Caption         =   "ItemCRC:"
  195.       ForeColor       =   &H80000008&
  196.       Height          =   255
  197.       Left            =   2520
  198.       TabIndex        =   5
  199.       Top             =   720
  200.       Width           =   1935
  201.    End
  202.    Begin VB.Label ItemFileName 
  203.       Alignment       =   1  'Right Justify
  204.       Appearance      =   0  'Flat
  205.       BackColor       =   &H80000005&
  206.       ForeColor       =   &H80000008&
  207.       Height          =   255
  208.       Left            =   4560
  209.       TabIndex        =   4
  210.       Top             =   1440
  211.       Width           =   2415
  212.    End
  213.    Begin VB.Label Label2 
  214.       Appearance      =   0  'Flat
  215.       BackColor       =   &H80000005&
  216.       Caption         =   "ItemFileName:"
  217.       ForeColor       =   &H80000008&
  218.       Height          =   255
  219.       Left            =   2520
  220.       TabIndex        =   3
  221.       Top             =   1440
  222.       Width           =   1935
  223.    End
  224.    Begin VB.Label Label1 
  225.       Appearance      =   0  'Flat
  226.       BackColor       =   &H80000005&
  227.       Caption         =   "Files in ZIP:"
  228.       ForeColor       =   &H80000008&
  229.       Height          =   255
  230.       Left            =   240
  231.       TabIndex        =   1
  232.       Top             =   240
  233.       Width           =   1215
  234.    End
  235.    Begin VB.Menu MenuFile 
  236.       Caption         =   "&File"
  237.       Begin VB.Menu MenuFileOpen 
  238.          Caption         =   "&Open"
  239.          Shortcut        =   ^O
  240.       End
  241.       Begin VB.Menu MenuFileExit 
  242.          Caption         =   "E&xit"
  243.       End
  244.    End
  245. Attribute VB_Name = "ZSample"
  246. Attribute VB_Creatable = False
  247. Attribute VB_Exposed = False
  248. Option Explicit
  249. Private Sub Form_Load()
  250.     ZSample.Left = (Screen.Width - ZSample.Width) / 2
  251.     ZSample.Top = (Screen.Height - ZSample.Height) / 2
  252. End Sub
  253. Private Sub Form_Unload(Cancel As Integer)
  254.     End
  255. End Sub
  256. Private Sub List1_Click()
  257.     Dim I As Integer
  258.     If List1.ListIndex < 0 Then
  259.         ItemCompressed = ""
  260.         ItemCRC = ""
  261.         ItemDate = ""
  262.         ItemFileComment = ""
  263.         ItemFileName = ""
  264.         ItemMethod = ""
  265.         ItemTime = ""
  266.         ItemUncompressed = ""
  267.     Else
  268.         I = List1.ItemData(List1.ListIndex)
  269.         ItemCompressed = Format$(ZipInfo1.ItemCompressed(I)) + " bytes"
  270.         ItemCRC = Hex$(ZipInfo1.ItemCRC(I))
  271.         ItemDate = ZipInfo1.ItemDate(I)
  272.         ItemFileComment = ZipInfo1.ItemFileComment(I)
  273.         ItemFileName = ZipInfo1.ItemFileName(I)
  274.         Select Case ZipInfo1.ItemMethod(I)
  275.             Case 0
  276.                 ItemMethod = "None"
  277.             Case 1
  278.                 ItemMethod = "Shrunk"
  279.             Case 2 - 5
  280.                 ItemMethod = "Reduced"
  281.             Case 6
  282.                 ItemMethod = "Imploded"
  283.             Case 7
  284.                 ItemMethod = "Tokenized"
  285.             Case 8
  286.                 ItemMethod = "Deflated"
  287.             Case Else
  288.                 ItemMethod = "Unknown"
  289.         End Select
  290.         ItemTime = ZipInfo1.ItemTime(I)
  291.         ItemUncompressed = Format$(ZipInfo1.ItemUncompressed(I)) + " bytes"
  292.     End If
  293. End Sub
  294. Private Sub MenuFileExit_Click()
  295.     End
  296. End Sub
  297. Private Sub MenuFileOpen_Click()
  298.     Dim I As Integer
  299.     ZSample2.Show 1
  300.     List1.Clear
  301.     For I = 0 To ZipInfo1.ListCount - 1
  302.         List1.AddItem ZipInfo1.ItemFileName(I)
  303.         List1.ItemData(List1.NewIndex) = I
  304.     Next I
  305. End Sub
  306.