home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / azpzip / _setup.1 / frmExtract.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-11-25  |  4.9 KB  |  151 lines

  1. VERSION 5.00
  2. Begin VB.Form frmExtract 
  3.    BorderStyle     =   4  'Fixed ToolWindow
  4.    Caption         =   "Extract from Archive"
  5.    ClientHeight    =   2910
  6.    ClientLeft      =   45
  7.    ClientTop       =   285
  8.    ClientWidth     =   3870
  9.    BeginProperty Font 
  10.       Name            =   "Tahoma"
  11.       Size            =   8.25
  12.       Charset         =   0
  13.       Weight          =   400
  14.       Underline       =   0   'False
  15.       Italic          =   0   'False
  16.       Strikethrough   =   0   'False
  17.    EndProperty
  18.    LinkTopic       =   "Form1"
  19.    MaxButton       =   0   'False
  20.    MinButton       =   0   'False
  21.    ScaleHeight     =   2910
  22.    ScaleWidth      =   3870
  23.    ShowInTaskbar   =   0   'False
  24.    StartUpPosition =   3  'Windows Default
  25.    Begin VB.Frame frNew 
  26.       Caption         =   "New archive name:"
  27.       BeginProperty Font 
  28.          Name            =   "Tahoma"
  29.          Size            =   8.25
  30.          Charset         =   0
  31.          Weight          =   700
  32.          Underline       =   0   'False
  33.          Italic          =   0   'False
  34.          Strikethrough   =   0   'False
  35.       EndProperty
  36.       Height          =   2895
  37.       Left            =   0
  38.       TabIndex        =   0
  39.       Top             =   0
  40.       Width           =   3855
  41.       Begin VB.DriveListBox driveNew 
  42.          Height          =   315
  43.          Left            =   120
  44.          TabIndex        =   6
  45.          Top             =   240
  46.          Width           =   2295
  47.       End
  48.       Begin VB.CommandButton cmdCancel 
  49.          Caption         =   "&Cancel"
  50.          Height          =   285
  51.          Left            =   2520
  52.          TabIndex        =   5
  53.          Top             =   600
  54.          Width           =   1095
  55.       End
  56.       Begin VB.CommandButton cmdExtract 
  57.          Caption         =   "E&xtract"
  58.          Height          =   285
  59.          Left            =   2520
  60.          TabIndex        =   4
  61.          Top             =   240
  62.          Width           =   1095
  63.       End
  64.       Begin VB.TextBox Text1 
  65.          Height          =   285
  66.          Left            =   120
  67.          TabIndex        =   3
  68.          Text            =   "NewDirectory"
  69.          Top             =   2520
  70.          Width           =   2295
  71.       End
  72.       Begin VB.CommandButton cmdNewDir 
  73.          Caption         =   "&Add Folder"
  74.          Height          =   285
  75.          Left            =   2520
  76.          TabIndex        =   2
  77.          Top             =   2520
  78.          Width           =   1095
  79.       End
  80.       Begin VB.DirListBox dirNew 
  81.          Height          =   1890
  82.          Left            =   120
  83.          TabIndex        =   1
  84.          Top             =   600
  85.          Width           =   2295
  86.       End
  87.       Begin VB.Label lblHelp 
  88.          Caption         =   "To create a new sub-directory use the space below and press ""Add Folder"""
  89.          Height          =   1455
  90.          Left            =   2520
  91.          TabIndex        =   7
  92.          Top             =   960
  93.          Width           =   1215
  94.          WordWrap        =   -1  'True
  95.       End
  96.    End
  97. Attribute VB_Name = "frmExtract"
  98. Attribute VB_GlobalNameSpace = False
  99. Attribute VB_Creatable = False
  100. Attribute VB_PredeclaredId = True
  101. Attribute VB_Exposed = False
  102. Option Explicit
  103. Private Sub cmdCancel_Click()
  104.     Unload Me
  105. End Sub
  106. Private Sub cmdExtract_Click()
  107.     Dim FileName As String
  108.     Dim i As Integer
  109.     'Don't add a "\" to a Drive itself "D:\" or it will look like, "D:\\"
  110.     If Len(dirNew.Path) > 3 Then
  111.         frmAZPCoDec.ActiveZipperPro1.Destination = dirNew.Path & "\"
  112.     Else
  113.         frmAZPCoDec.ActiveZipperPro1.Destination = dirNew.Path
  114.     End If
  115.     Me.Visible = False
  116. If UseZip = False Then
  117.     frmAZPCoDec.ActiveZipperPro1.CompLevel (1) 'Init the MaxFiles property
  118.     For i = 1 To frmAZPCoDec.ActiveZipperPro1.MaxFiles
  119.         FileName = frmAZPCoDec.ListView1.ListItems(i)
  120.         'set the status bar
  121.         frmAZPCoDec.stat.Panels(1).Text = "Extracting " & FileName & "..."
  122.         frmAZPCoDec.ActiveZipperPro1.DecompressedFile = FileName
  123.         frmAZPCoDec.ActiveZipperPro1.Decompress i, RFile, WState
  124.     Next
  125.     Else
  126.     frmAZPCoDec.ActiveZipperPro1.UnZipIt True
  127.     End If
  128.     frmAZPCoDec.stat.Panels(1).Text = "No Task..."
  129.     Unload Me
  130. End Sub
  131. Private Sub cmdNewDir_Click()
  132.     Dim NewPath As String
  133.     'Don't add the "\" to the Root Drive path.  i.e. "D:\" would look like "D:\\"
  134.     If Len(dirNew.Path) > 3 Then
  135.         NewPath = dirNew.Path & "\" & Text1.Text
  136.     Else
  137.         NewPath = dirNew.Path & Text1.Text
  138.     End If
  139.     MkDir NewPath
  140.     dirNew.Path = NewPath
  141. End Sub
  142. Private Sub dirNew_Change()
  143.     Dim KeyAscii As Integer
  144.     If KeyAscii = 10 Or 13 Then
  145.         dirNew.Path = dirNew.List(dirNew.ListIndex)
  146.     End If
  147. End Sub
  148. Private Sub driveNew_Change()
  149.     dirNew.Path = driveNew.Drive
  150. End Sub
  151.