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 >
Wrap
Text File
|
1996-04-19
|
5KB
|
182 lines
VERSION 4.00
Begin VB.Form Form1
Caption = "VB Example 25"
ClientHeight = 4380
ClientLeft = 1740
ClientTop = 1320
ClientWidth = 6225
Height = 4785
Left = 1680
LinkTopic = "Form1"
ScaleHeight = 4380
ScaleWidth = 6225
Top = 975
Width = 6345
Begin VB.CommandButton About
Caption = "About"
Height = 495
Left = 1800
TabIndex = 10
Top = 2280
Width = 975
End
Begin VB.OptionButton TrackJob
Caption = "Track Job"
Height = 375
Left = 4560
TabIndex = 9
Top = 2640
Width = 1095
End
Begin VB.OptionButton TrackObjects
Caption = "Track Objects"
Height = 375
Left = 4560
TabIndex = 8
Top = 2280
Value = -1 'True
Width = 1455
End
Begin VB.TextBox Progress
Height = 495
Left = 2040
TabIndex = 6
Text = "Progress - Invisible"
Top = 3360
Visible = 0 'False
Width = 1455
End
Begin VB.TextBox Filename
Height = 495
Left = 1080
TabIndex = 5
Text = "File Name"
Top = 3000
Width = 3135
End
Begin VB.CommandButton Exit
Caption = "Exit"
Height = 495
Left = 3000
TabIndex = 4
Top = 2280
Width = 975
End
Begin VB.CommandButton AppendFiles
Caption = "Append Files"
Height = 495
Left = 360
TabIndex = 3
Top = 2280
Width = 1215
End
Begin VB.FileListBox File2
Height = 1815
Left = 3600
MultiSelect = 2 'Extended
TabIndex = 2
Top = 240
Width = 1335
End
Begin VB.ListBox List1
Height = 1815
Left = 1920
TabIndex = 1
Top = 240
Width = 1455
End
Begin VB.FileListBox File1
Height = 1815
Left = 360
Pattern = "*.zip"
TabIndex = 0
Top = 240
Width = 1335
End
Begin Threed.SSPanel SSPanel1
Height = 495
Left = 1080
TabIndex = 7
Top = 3600
Width = 3135
_Version = 65536
_ExtentX = 5530
_ExtentY = 873
_StockProps = 15
Caption = "SSPanel1"
BackColor = 12632256
FloodType = 1
End
End
Attribute VB_Name = "Form1"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Dim LibraryHandle As Long
Private Sub About_Click()
frmAbout.Text1 = "EX25VB demonstrates the simplified interface. Double click on a"
frmAbout.Text1 = frmAbout.Text1 + " zip file to display its contents. You can append files to the archive."
frmAbout.Text1 = frmAbout.Text1 + " The Track Objects button will allow you to see the progress on each"
frmAbout.Text1 = frmAbout.Text1 + " individual file as it is added. The Track Job button will show the"
frmAbout.Text1 = frmAbout.Text1 + " progress of the entire job."
frmAbout.Show 1
End Sub
Private Sub AppendFiles_Click()
Dim i As Long
Dim files As String
files = ""
For i = 0 To File2.ListCount - 1
If File2.Selected(i) Then
files = files + " " + File2.List(i)
End If
Next i
If TrackObjects.Value = True Then
i = ALAppend(File1.FileName, files, 0, FileName.hWnd, Progress.hWnd, 0)
Else
i = ALAppend(File1.FileName, files, 0, FileName.hWnd, 0, Progress.hWnd)
End If
File1_DblClick
End Sub
Private Sub Exit_Click()
Unload Form1
End
End Sub
Private Sub File1_DblClick()
Dim z() As ALZipDir
Dim count As Long
Dim status As Long
If File1.FileName <> "" Then
ALReadDir z(), File1.FileName, count, status
List1.Clear
i = 0
While z(i).size <> -1
List1.AddItem z(i).name
i = i + 1
Wend
End If
End Sub
Private Sub Form_Load()
ChDrive App.Path
ChDir App.Path
File1.Path = App.Path
LibraryHandle = LoadLibrary(DLLName)
If LibraryHandle = 0 Then FileName.text = "***Error loading " + DLLName + "***"
End Sub
Private Sub Form_Unload(Cancel As Integer)
FreeLibrary (LibraryHandle)
End Sub
Private Sub Progress_Change()
SSPanel1.FloodPercent = Val(Progress.text)
End Sub