home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 31 / CDASC_31_1996_juillet_aout.iso / vrac / altd201a.zip / VB30.ARJ / VB30 / EX25VB.FRM < prev    next >
Text File  |  1996-04-19  |  5KB  |  184 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "VB Example 25"
  5.    ClientHeight    =   4500
  6.    ClientLeft      =   1740
  7.    ClientTop       =   1320
  8.    ClientWidth     =   6345
  9.    Height          =   4905
  10.    Left            =   1680
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   4500
  13.    ScaleWidth      =   6345
  14.    Top             =   975
  15.    Width           =   6465
  16.    Begin CommandButton About 
  17.       Caption         =   "About"
  18.       Height          =   495
  19.       Left            =   1680
  20.       TabIndex        =   10
  21.       Top             =   2280
  22.       Width           =   1455
  23.    End
  24.    Begin OptionButton TrackJob 
  25.       BackColor       =   &H80000000&
  26.       Caption         =   "Track Job"
  27.       Height          =   375
  28.       Left            =   4560
  29.       TabIndex        =   9
  30.       Top             =   2640
  31.       Width           =   1575
  32.    End
  33.    Begin OptionButton TrackObjects 
  34.       BackColor       =   &H80000000&
  35.       Caption         =   "Track Objects"
  36.       Height          =   375
  37.       Left            =   4560
  38.       TabIndex        =   8
  39.       Top             =   2280
  40.       Value           =   -1  'True
  41.       Width           =   1455
  42.    End
  43.    Begin TextBox Progress 
  44.       Height          =   495
  45.       Left            =   2040
  46.       TabIndex        =   6
  47.       Text            =   "Progress - Invisible"
  48.       Top             =   3360
  49.       Visible         =   0   'False
  50.       Width           =   1455
  51.    End
  52.    Begin TextBox Filename 
  53.       Height          =   495
  54.       Left            =   1080
  55.       TabIndex        =   5
  56.       Text            =   "File Name"
  57.       Top             =   3000
  58.       Width           =   3135
  59.    End
  60.    Begin CommandButton Exit 
  61.       Caption         =   "Exit"
  62.       Height          =   495
  63.       Left            =   3360
  64.       TabIndex        =   4
  65.       Top             =   2280
  66.       Width           =   975
  67.    End
  68.    Begin CommandButton AppendFiles 
  69.       Caption         =   "Append Files"
  70.       Height          =   495
  71.       Left            =   120
  72.       TabIndex        =   3
  73.       Top             =   2280
  74.       Width           =   1455
  75.    End
  76.    Begin FileListBox File2 
  77.       Height          =   1785
  78.       Left            =   3600
  79.       MultiSelect     =   2  'Extended
  80.       TabIndex        =   2
  81.       Top             =   240
  82.       Width           =   1335
  83.    End
  84.    Begin ListBox List1 
  85.       Height          =   1785
  86.       Left            =   1920
  87.       TabIndex        =   1
  88.       Top             =   240
  89.       Width           =   1455
  90.    End
  91.    Begin FileListBox File1 
  92.       Height          =   1785
  93.       Left            =   360
  94.       Pattern         =   "*.zip"
  95.       TabIndex        =   0
  96.       Top             =   240
  97.       Width           =   1335
  98.    End
  99.    Begin SSPanel SSPanel1 
  100.       BackColor       =   &H00C0C0C0&
  101.       FloodType       =   1  'Left To Right
  102.       Font3D          =   0  'None
  103.       Height          =   495
  104.       Left            =   1080
  105.       TabIndex        =   7
  106.       Top             =   3600
  107.       Width           =   3135
  108.    End
  109.    Begin SSPanel Panel3D1 
  110.       BackColor       =   &H00C0C0C0&
  111.       FloodShowPct    =   0   'False
  112.       Font3D          =   0  'None
  113.       Height          =   5175
  114.       Left            =   0
  115.       TabIndex        =   11
  116.       Top             =   0
  117.       Width           =   6615
  118.    End
  119. End
  120. Dim LibraryHandle As Long
  121.  
  122. Sub About_Click ()
  123.     frmAbout.Text1 = "EX25VB demonstrates the simplified interface.  Double click on a"
  124.     frmAbout.Text1 = frmAbout.Text1 + " zip file to display its contents.  You can append files to the archive."
  125.     frmAbout.Text1 = frmAbout.Text1 + " The Track Objects button will allow you to see the progress on each"
  126.     frmAbout.Text1 = frmAbout.Text1 + " individual file as it is added.  The Track Job button will show the"
  127.     frmAbout.Text1 = frmAbout.Text1 + " progress of the entire job."
  128.    frmAbout.Show 1
  129. End Sub
  130.  
  131. Sub AppendFiles_Click ()
  132.     Dim i As Integer
  133.     Dim files As String
  134.     files = ""
  135.     For i = 0 To File2.ListCount - 1
  136.         If File2.Selected(i) Then
  137.             files = files + " " + File2.List(i)
  138.         End If
  139.     Next i
  140.     If TrackObjects.Value = True Then
  141.         i = ALAppend(File1.FileName, files, 0, FileName.hWnd, Progress.hWnd, 0)
  142.     Else
  143.         i = ALAppend(File1.FileName, files, 0, FileName.hWnd, 0, Progress.hWnd)
  144.     End If
  145.     File1_DblClick
  146. End Sub
  147.  
  148. Sub Exit_Click ()
  149.   Unload Form1
  150.   End
  151. End Sub
  152.  
  153. Sub File1_DblClick ()
  154.     Dim z() As ALZipDir
  155.     Dim count As Integer
  156.     Dim Status As Integer
  157.  
  158.     If File1.FileName <> "" Then
  159.         ALReadDir z(), File1.FileName, Status, Status
  160.         List1.Clear
  161.         i = 0
  162.         While z(i).size <> -1
  163.           List1.AddItem z(i).name
  164.           i = i + 1
  165.         Wend
  166.     End If
  167. End Sub
  168.  
  169. Sub Form_Load ()
  170.     ChDrive App.Path
  171.     ChDir App.Path
  172.     LibraryHandle = LoadLibrary(DLLName())
  173.     File1.Path = App.Path
  174. End Sub
  175.  
  176. Sub Form_Unload (Cancel As Integer)
  177.     FreeLibrary LibraryHandle
  178. End Sub
  179.  
  180. Sub Progress_Change ()
  181.   SSPanel1.FloodPercent = Val(Progress.Text)
  182. End Sub
  183.  
  184.