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

  1. VERSION 5.00
  2. Begin VB.Form frmAdd 
  3.    BorderStyle     =   4  'Fixed ToolWindow
  4.    Caption         =   "Add to Archive"
  5.    ClientHeight    =   4110
  6.    ClientLeft      =   1710
  7.    ClientTop       =   795
  8.    ClientWidth     =   4935
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    ScaleHeight     =   4110
  13.    ScaleWidth      =   4935
  14.    ShowInTaskbar   =   0   'False
  15.    Begin VB.Frame frFileSelect 
  16.       Caption         =   "File Select"
  17.       BeginProperty Font 
  18.          Name            =   "Tahoma"
  19.          Size            =   8.25
  20.          Charset         =   0
  21.          Weight          =   700
  22.          Underline       =   0   'False
  23.          Italic          =   0   'False
  24.          Strikethrough   =   0   'False
  25.       EndProperty
  26.       Height          =   2895
  27.       Left            =   120
  28.       TabIndex        =   5
  29.       Top             =   0
  30.       Width           =   4695
  31.       Begin VB.DriveListBox drvList 
  32.          BeginProperty Font 
  33.             Name            =   "Tahoma"
  34.             Size            =   8.25
  35.             Charset         =   0
  36.             Weight          =   400
  37.             Underline       =   0   'False
  38.             Italic          =   0   'False
  39.             Strikethrough   =   0   'False
  40.          EndProperty
  41.          Height          =   315
  42.          Left            =   120
  43.          TabIndex        =   8
  44.          Top             =   240
  45.          Width           =   4455
  46.       End
  47.       Begin VB.DirListBox dirAdd 
  48.          BeginProperty Font 
  49.             Name            =   "Tahoma"
  50.             Size            =   8.25
  51.             Charset         =   0
  52.             Weight          =   400
  53.             Underline       =   0   'False
  54.             Italic          =   0   'False
  55.             Strikethrough   =   0   'False
  56.          EndProperty
  57.          Height          =   2115
  58.          Left            =   120
  59.          TabIndex        =   7
  60.          Top             =   675
  61.          Width           =   2295
  62.       End
  63.       Begin VB.FileListBox flbAdd 
  64.          BeginProperty Font 
  65.             Name            =   "Tahoma"
  66.             Size            =   8.25
  67.             Charset         =   0
  68.             Weight          =   400
  69.             Underline       =   0   'False
  70.             Italic          =   0   'False
  71.             Strikethrough   =   0   'False
  72.          EndProperty
  73.          Height          =   2040
  74.          Left            =   2520
  75.          MultiSelect     =   2  'Extended
  76.          TabIndex        =   6
  77.          Top             =   675
  78.          Width           =   2055
  79.       End
  80.    End
  81.    Begin VB.Frame frSearch 
  82.       Caption         =   "Search Pattern"
  83.       BeginProperty Font 
  84.          Name            =   "Tahoma"
  85.          Size            =   8.25
  86.          Charset         =   0
  87.          Weight          =   700
  88.          Underline       =   0   'False
  89.          Italic          =   0   'False
  90.          Strikethrough   =   0   'False
  91.       EndProperty
  92.       Height          =   680
  93.       Left            =   2520
  94.       TabIndex        =   3
  95.       Top             =   2880
  96.       Width           =   2295
  97.       Begin VB.TextBox txtFiles 
  98.          BeginProperty Font 
  99.             Name            =   "Tahoma"
  100.             Size            =   8.25
  101.             Charset         =   0
  102.             Weight          =   400
  103.             Underline       =   0   'False
  104.             Italic          =   0   'False
  105.             Strikethrough   =   0   'False
  106.          EndProperty
  107.          Height          =   315
  108.          Left            =   120
  109.          TabIndex        =   4
  110.          Text            =   "*.*"
  111.          Top             =   240
  112.          Width           =   2055
  113.       End
  114.    End
  115.    Begin VB.CommandButton cmdCancel 
  116.       Caption         =   "&Cancel"
  117.       BeginProperty Font 
  118.          Name            =   "Tahoma"
  119.          Size            =   8.25
  120.          Charset         =   0
  121.          Weight          =   400
  122.          Underline       =   0   'False
  123.          Italic          =   0   'False
  124.          Strikethrough   =   0   'False
  125.       EndProperty
  126.       Height          =   375
  127.       Left            =   1320
  128.       TabIndex        =   2
  129.       Top             =   3650
  130.       Width           =   1095
  131.    End
  132.    Begin VB.CommandButton cmdWild 
  133.       Caption         =   "Add with &Wildcard"
  134.       BeginProperty Font 
  135.          Name            =   "Tahoma"
  136.          Size            =   8.25
  137.          Charset         =   0
  138.          Weight          =   400
  139.          Underline       =   0   'False
  140.          Italic          =   0   'False
  141.          Strikethrough   =   0   'False
  142.       EndProperty
  143.       Height          =   375
  144.       Left            =   2520
  145.       TabIndex        =   1
  146.       Top             =   3650
  147.       Width           =   2295
  148.    End
  149.    Begin VB.CommandButton cmdAdd 
  150.       Caption         =   "&Add"
  151.       Default         =   -1  'True
  152.       BeginProperty Font 
  153.          Name            =   "Tahoma"
  154.          Size            =   8.25
  155.          Charset         =   0
  156.          Weight          =   400
  157.          Underline       =   0   'False
  158.          Italic          =   0   'False
  159.          Strikethrough   =   0   'False
  160.       EndProperty
  161.       Height          =   375
  162.       Left            =   120
  163.       TabIndex        =   0
  164.       Top             =   3650
  165.       Width           =   1095
  166.    End
  167.    Begin VB.Frame Frame1 
  168.       Caption         =   "Password"
  169.       BeginProperty Font 
  170.          Name            =   "Tahoma"
  171.          Size            =   8.25
  172.          Charset         =   0
  173.          Weight          =   700
  174.          Underline       =   0   'False
  175.          Italic          =   0   'False
  176.          Strikethrough   =   0   'False
  177.       EndProperty
  178.       Height          =   680
  179.       Left            =   120
  180.       TabIndex        =   9
  181.       Top             =   2880
  182.       Width           =   2295
  183.       Begin VB.TextBox txtPass 
  184.          BeginProperty Font 
  185.             Name            =   "Tahoma"
  186.             Size            =   8.25
  187.             Charset         =   0
  188.             Weight          =   400
  189.             Underline       =   0   'False
  190.             Italic          =   0   'False
  191.             Strikethrough   =   0   'False
  192.          EndProperty
  193.          Height          =   315
  194.          Left            =   120
  195.          TabIndex        =   10
  196.          Top             =   240
  197.          Width           =   2055
  198.       End
  199.    End
  200. Attribute VB_Name = "frmAdd"
  201. Attribute VB_GlobalNameSpace = False
  202. Attribute VB_Creatable = False
  203. Attribute VB_PredeclaredId = True
  204. Attribute VB_Exposed = False
  205. Private Sub cmdAdd_Click()
  206.     Dim Files As String
  207.     For i = 0 To flbAdd.ListCount - 1
  208.         If flbAdd.Selected(i) Then
  209.             'Don't add the "\" to the Root Drive path.  i.e. "D:\" would look like "D:\\"
  210.             If Len(flbAdd.Path) > 3 Then
  211.                 Files = flbAdd.Path & "\" & flbAdd.List(i) & "," & Files
  212.             Else
  213.                 Files = flbAdd.Path & flbAdd.List(i) & "," & Files
  214.             End If
  215.         End If
  216.     Next
  217.     If Len(Files) > 1 Then
  218.         Files = Left(Files, Len(Files) - 1)
  219.         frmAZPCoDec.ActiveZipperPro1.SourceFile = Files
  220.         frmAZPCoDec.ActiveZipperPro1.Password = txtPass.Text
  221.     End If
  222.     Me.Visible = False
  223.     frmAZPCoDec.stat.Panels(1).Text = "Compressing selected files..."
  224.     If UseZip = False Then
  225.     If Files <> "" Then
  226.     frmAZPCoDec.ActiveZipperPro1.Compress
  227.     DisplayFile frmAZPCoDec.ActiveZipperPro1.Destination & frmAZPCoDec.ActiveZipperPro1.OutPutFile & ".az"
  228.     End If
  229.     Else
  230.     If Files <> "" Then frmAZPCoDec.ActiveZipperPro1.ZipIt True, False, False, vbNullString
  231.     DisplayZipContents frmAZPCoDec.ActiveZipperPro1.OutPutFile
  232.     End If
  233.     frmAZPCoDec.stat.Panels(1).Text = "No Task..."
  234.     Unload Me
  235. End Sub
  236. Private Sub cmdCancel_Click()
  237.     Unload Me
  238. End Sub
  239. Private Sub cmdWild_Click()
  240.     Dim Files As String
  241.     For i = 0 To flbAdd.ListCount - 1
  242.         'Don't add the "\" to the Root Drive path.  i.e. "D:\" would look like "D:\\"
  243.         If Len(flbAdd.Path) > 3 Then
  244.             Files = flbAdd.Path & "\" & flbAdd.List(i) & "," & Files
  245.         Else
  246.             Files = flbAdd.Path & flbAdd.List(i) & "," & Files
  247.         End If
  248.     Next
  249.     If Len(Files) > 1 Then
  250.         Files = Left(Files, Len(Files) - 1)
  251.         frmAZPCoDec.ActiveZipperPro1.SourceFile = Files
  252.         frmAZPCoDec.ActiveZipperPro1.Password = txtPass.Text
  253.     End If
  254.     Me.Visible = False
  255.     frmAZPCoDec.stat.Panels(1).Text = "Compressing selected files..."
  256.     If Files <> "" Then frmAZPCoDec.ActiveZipperPro1.Compress
  257.     DisplayFile frmAZPCoDec.ActiveZipperPro1.Destination & frmAZPCoDec.ActiveZipperPro1.OutPutFile & ".az"
  258.     frmAZPCoDec.stat.Panels(1).Text = "No Task..."
  259.     Unload Me
  260. End Sub
  261. Private Sub dirAdd_Change()
  262.     flbAdd.Path = dirAdd.Path
  263. End Sub
  264. Private Sub drvList_Change()
  265.     dirAdd.Path = drvList.Drive
  266. End Sub
  267. Private Sub Form_Load()
  268.     Me.Visible = True
  269.     Me.Caption = "Add to Archive - " & frmAZPCoDec.ActiveZipperPro1.OutPutFile
  270.     If UseZip = True Then
  271.     Frame1.Visible = False
  272.     cmdWild.Visible = False
  273.     Else
  274.     Frame1.Visible = True
  275.     cmdWild.Visible = True
  276.     End If
  277. End Sub
  278. Private Sub txtFiles_Change()
  279.     flbAdd.Pattern = txtFiles.Text & "*"
  280. End Sub
  281.