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

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "VB Example 25"
  4.    ClientHeight    =   4605
  5.    ClientLeft      =   1740
  6.    ClientTop       =   1320
  7.    ClientWidth     =   6225
  8.    Height          =   5010
  9.    Left            =   1680
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   4605
  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             =   2640
  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             =   3000
  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             =   2640
  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             =   3720
  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             =   3360
  55.       Width           =   3135
  56.    End
  57.    Begin VB.CommandButton Exit 
  58.       Caption         =   "Exit"
  59.       Height          =   495
  60.       Left            =   3000
  61.       TabIndex        =   4
  62.       Top             =   2640
  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             =   2640
  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             =   600
  79.       Width           =   1335
  80.    End
  81.    Begin VB.ListBox List1 
  82.       Height          =   1815
  83.       Left            =   1920
  84.       TabIndex        =   1
  85.       Top             =   600
  86.       Width           =   1455
  87.    End
  88.    Begin VB.FileListBox File1 
  89.       Height          =   1815
  90.       Left            =   360
  91.       Pattern         =   "*.zip"
  92.       TabIndex        =   0
  93.       Top             =   600
  94.       Width           =   1335
  95.    End
  96.    Begin Threed.SSPanel SSPanel1 
  97.       Height          =   495
  98.       Left            =   1080
  99.       TabIndex        =   7
  100.       Top             =   3960
  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.    Begin VB.Label Label3 
  111.       Alignment       =   2  'Center
  112.       Caption         =   "Files"
  113.       BeginProperty Font 
  114.          name            =   "MS Sans Serif"
  115.          charset         =   0
  116.          weight          =   700
  117.          size            =   9.75
  118.          underline       =   0   'False
  119.          italic          =   0   'False
  120.          strikethrough   =   0   'False
  121.       EndProperty
  122.       Height          =   255
  123.       Left            =   3480
  124.       TabIndex        =   13
  125.       Top             =   240
  126.       Width           =   1455
  127.    End
  128.    Begin VB.Label Label2 
  129.       Alignment       =   2  'Center
  130.       Caption         =   "Archives"
  131.       BeginProperty Font 
  132.          name            =   "MS Sans Serif"
  133.          charset         =   0
  134.          weight          =   700
  135.          size            =   9.75
  136.          underline       =   0   'False
  137.          italic          =   0   'False
  138.          strikethrough   =   0   'False
  139.       EndProperty
  140.       Height          =   255
  141.       Left            =   240
  142.       TabIndex        =   12
  143.       Top             =   240
  144.       Width           =   1575
  145.    End
  146.    Begin VB.Label Label1 
  147.       Alignment       =   2  'Center
  148.       Caption         =   "Contents"
  149.       BeginProperty Font 
  150.          name            =   "MS Sans Serif"
  151.          charset         =   0
  152.          weight          =   700
  153.          size            =   9.75
  154.          underline       =   0   'False
  155.          italic          =   0   'False
  156.          strikethrough   =   0   'False
  157.       EndProperty
  158.       Height          =   255
  159.       Left            =   1920
  160.       TabIndex        =   11
  161.       Top             =   240
  162.       Width           =   1455
  163.    End
  164. End
  165. Attribute VB_Name = "Form1"
  166. Attribute VB_Creatable = False
  167. Attribute VB_Exposed = False
  168. Dim LibraryHandle As Long
  169.  
  170. Private Sub About_Click()
  171.   frmAbout.Text1 = "EX25VB demonstrates the simplified interface.  Double click on a"
  172.   frmAbout.Text1 = frmAbout.Text1 + " zip file to display its contents.  You can append files to the archive."
  173.   frmAbout.Text1 = frmAbout.Text1 + " The Track Objects button will allow you to see the progress on each"
  174.   frmAbout.Text1 = frmAbout.Text1 + " individual file as it is added.  The Track Job button will show the"
  175.   frmAbout.Text1 = frmAbout.Text1 + " progress of the entire job."
  176.   frmAbout.Show 1
  177. End Sub
  178.  
  179.  
  180. Private Sub AppendFiles_Click()
  181.     Dim i As Integer
  182.     Dim files As String
  183.     files = ""
  184.     For i = 0 To File2.ListCount - 1
  185.         If File2.Selected(i) Then
  186.             files = files + " " + File2.list(i)
  187.         End If
  188.     Next i
  189.     If TrackObjects.Value = True Then
  190.         i = ALAppend(File1.filename, files, 0, filename.hWnd, Progress.hWnd, 0)
  191.     Else
  192.         i = ALAppend(File1.filename, files, 0, filename.hWnd, 0, Progress.hWnd)
  193.     End If
  194.     File1_DblClick
  195. End Sub
  196.  
  197.  
  198. Private Sub Exit_Click()
  199.   Unload Form1
  200.   End
  201. End Sub
  202.  
  203. Private Sub File1_DblClick()
  204.     Dim z() As ALZipDir
  205.     Dim count As Integer
  206.     Dim status As Integer
  207.     If File1.filename <> "" Then
  208.         ALReadDir z(), File1.filename, count, status
  209.         List1.Clear
  210.         i = 0
  211.         While z(i).size <> -1
  212.           List1.AddItem z(i).name
  213.           i = i + 1
  214.         Wend
  215.     End If
  216. End Sub
  217.  
  218.  
  219. Private Sub Form_Load()
  220.     ChDrive App.Path
  221.     ChDir App.Path
  222.     LibraryHandle = LoadLibrary(DLLName)
  223.     If LibraryHandle < 32 Then filename.text = "***ERROR LOADING " + DLLName + "***"
  224.     File1.Path = App.Path
  225. End Sub
  226.  
  227.  
  228. Private Sub Form_Unload(Cancel As Integer)
  229.     FreeLibrary LibraryHandle
  230. End Sub
  231.  
  232.  
  233.  
  234.  
  235.  
  236. Private Sub Progress_Change()
  237.   SSPanel1.FloodPercent = Val(Progress.text)
  238. End Sub
  239.  
  240.  
  241.