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 >
Wrap
Text File
|
1996-04-19
|
7KB
|
241 lines
VERSION 4.00
Begin VB.Form Form1
Caption = "VB Example 25"
ClientHeight = 4605
ClientLeft = 1740
ClientTop = 1320
ClientWidth = 6225
Height = 5010
Left = 1680
LinkTopic = "Form1"
ScaleHeight = 4605
ScaleWidth = 6225
Top = 975
Width = 6345
Begin VB.CommandButton About
Caption = "About"
Height = 495
Left = 1800
TabIndex = 10
Top = 2640
Width = 975
End
Begin VB.OptionButton TrackJob
Caption = "Track Job"
Height = 375
Left = 4560
TabIndex = 9
Top = 3000
Width = 1095
End
Begin VB.OptionButton TrackObjects
Caption = "Track Objects"
Height = 375
Left = 4560
TabIndex = 8
Top = 2640
Value = -1 'True
Width = 1455
End
Begin VB.TextBox Progress
Height = 495
Left = 2040
TabIndex = 6
Text = "Progress - Invisible"
Top = 3720
Visible = 0 'False
Width = 1455
End
Begin VB.TextBox Filename
Height = 495
Left = 1080
TabIndex = 5
Text = "File Name"
Top = 3360
Width = 3135
End
Begin VB.CommandButton Exit
Caption = "Exit"
Height = 495
Left = 3000
TabIndex = 4
Top = 2640
Width = 975
End
Begin VB.CommandButton AppendFiles
Caption = "Append Files"
Height = 495
Left = 360
TabIndex = 3
Top = 2640
Width = 1215
End
Begin VB.FileListBox File2
Height = 1815
Left = 3600
MultiSelect = 2 'Extended
TabIndex = 2
Top = 600
Width = 1335
End
Begin VB.ListBox List1
Height = 1815
Left = 1920
TabIndex = 1
Top = 600
Width = 1455
End
Begin VB.FileListBox File1
Height = 1815
Left = 360
Pattern = "*.zip"
TabIndex = 0
Top = 600
Width = 1335
End
Begin Threed.SSPanel SSPanel1
Height = 495
Left = 1080
TabIndex = 7
Top = 3960
Width = 3135
_version = 65536
_extentx = 5530
_extenty = 873
_stockprops = 15
caption = "SSPanel1"
backcolor = 12632256
floodtype = 1
End
Begin VB.Label Label3
Alignment = 2 'Center
Caption = "Files"
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 700
size = 9.75
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 255
Left = 3480
TabIndex = 13
Top = 240
Width = 1455
End
Begin VB.Label Label2
Alignment = 2 'Center
Caption = "Archives"
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 700
size = 9.75
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 255
Left = 240
TabIndex = 12
Top = 240
Width = 1575
End
Begin VB.Label Label1
Alignment = 2 'Center
Caption = "Contents"
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 700
size = 9.75
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 255
Left = 1920
TabIndex = 11
Top = 240
Width = 1455
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 Integer
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 Integer
Dim status As Integer
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
LibraryHandle = LoadLibrary(DLLName)
If LibraryHandle < 32 Then filename.text = "***ERROR LOADING " + DLLName + "***"
File1.Path = App.Path
End Sub
Private Sub Form_Unload(Cancel As Integer)
FreeLibrary LibraryHandle
End Sub
Private Sub Progress_Change()
SSPanel1.FloodPercent = Val(Progress.text)
End Sub