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

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