home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Freesoft 1997 March
/
Freesoft_1997-03_cd.bin
/
recenz
/
926
/
VB30.ARJ
/
VB30
/
EX25VB.FRM
< prev
next >
Wrap
Text File
|
1996-04-19
|
5KB
|
184 lines
VERSION 2.00
Begin Form Form1
BorderStyle = 1 'Fixed Single
Caption = "VB Example 25"
ClientHeight = 4500
ClientLeft = 1740
ClientTop = 1320
ClientWidth = 6345
Height = 4905
Left = 1680
LinkTopic = "Form1"
ScaleHeight = 4500
ScaleWidth = 6345
Top = 975
Width = 6465
Begin CommandButton About
Caption = "About"
Height = 495
Left = 1680
TabIndex = 10
Top = 2280
Width = 1455
End
Begin OptionButton TrackJob
BackColor = &H80000000&
Caption = "Track Job"
Height = 375
Left = 4560
TabIndex = 9
Top = 2640
Width = 1575
End
Begin OptionButton TrackObjects
BackColor = &H80000000&
Caption = "Track Objects"
Height = 375
Left = 4560
TabIndex = 8
Top = 2280
Value = -1 'True
Width = 1455
End
Begin TextBox Progress
Height = 495
Left = 2040
TabIndex = 6
Text = "Progress - Invisible"
Top = 3360
Visible = 0 'False
Width = 1455
End
Begin TextBox Filename
Height = 495
Left = 1080
TabIndex = 5
Text = "File Name"
Top = 3000
Width = 3135
End
Begin CommandButton Exit
Caption = "Exit"
Height = 495
Left = 3360
TabIndex = 4
Top = 2280
Width = 975
End
Begin CommandButton AppendFiles
Caption = "Append Files"
Height = 495
Left = 120
TabIndex = 3
Top = 2280
Width = 1455
End
Begin FileListBox File2
Height = 1785
Left = 3600
MultiSelect = 2 'Extended
TabIndex = 2
Top = 240
Width = 1335
End
Begin ListBox List1
Height = 1785
Left = 1920
TabIndex = 1
Top = 240
Width = 1455
End
Begin FileListBox File1
Height = 1785
Left = 360
Pattern = "*.zip"
TabIndex = 0
Top = 240
Width = 1335
End
Begin SSPanel SSPanel1
BackColor = &H00C0C0C0&
FloodType = 1 'Left To Right
Font3D = 0 'None
Height = 495
Left = 1080
TabIndex = 7
Top = 3600
Width = 3135
End
Begin SSPanel Panel3D1
BackColor = &H00C0C0C0&
FloodShowPct = 0 'False
Font3D = 0 'None
Height = 5175
Left = 0
TabIndex = 11
Top = 0
Width = 6615
End
End
Dim LibraryHandle As Long
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
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
Sub Exit_Click ()
Unload Form1
End
End Sub
Sub File1_DblClick ()
Dim z() As ALZipDir
Dim count As Integer
Dim Status As Integer
If File1.FileName <> "" Then
ALReadDir z(), File1.FileName, Status, Status
List1.Clear
i = 0
While z(i).size <> -1
List1.AddItem z(i).name
i = i + 1
Wend
End If
End Sub
Sub Form_Load ()
ChDrive App.Path
ChDir App.Path
LibraryHandle = LoadLibrary(DLLName())
File1.Path = App.Path
End Sub
Sub Form_Unload (Cancel As Integer)
FreeLibrary LibraryHandle
End Sub
Sub Progress_Change ()
SSPanel1.FloodPercent = Val(Progress.Text)
End Sub