home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 31
/
CDASC_31_1996_juillet_aout.iso
/
vrac
/
altd201a.zip
/
VB4016.ARJ
/
VB40.16
/
EX26VB.FRM
< prev
next >
Wrap
Text File
|
1996-04-19
|
5KB
|
179 lines
VERSION 4.00
Begin VB.Form Form1
Caption = "VB Example 26"
ClientHeight = 4785
ClientLeft = 1410
ClientTop = 735
ClientWidth = 3750
Height = 5190
Left = 1350
LinkTopic = "Form1"
ScaleHeight = 4785
ScaleWidth = 3750
Top = 390
Width = 3870
Begin VB.CommandButton About
Caption = "About"
Height = 495
Left = 240
TabIndex = 7
Top = 3960
Width = 1455
End
Begin VB.CommandButton Extract
Caption = "Extract"
Height = 495
Left = 240
TabIndex = 6
Top = 3360
Width = 1455
End
Begin VB.CommandButton Delete
Caption = "Delete"
Height = 495
Left = 2040
TabIndex = 5
Top = 3360
Width = 1335
End
Begin VB.CommandButton Command1
Caption = "Exit"
Height = 495
Left = 2040
TabIndex = 4
Top = 3960
Width = 1335
End
Begin VB.ListBox List1
Height = 2205
Left = 2040
MultiSelect = 2 'Extended
TabIndex = 1
Top = 240
Width = 1335
End
Begin VB.FileListBox File1
Height = 2205
Left = 240
Pattern = "*.zip"
TabIndex = 0
Top = 240
Width = 1455
End
Begin Threed.SSPanel SSPanel1
Height = 375
Left = 480
TabIndex = 3
Top = 2520
Width = 2655
_version = 65536
_extentx = 4683
_extenty = 661
_stockprops = 15
caption = "SSPanel1"
backcolor = 12632256
floodtype = 1
End
Begin VB.TextBox JobProgress
Height = 375
Left = 480
TabIndex = 2
Text = "Job Progress -I'm invisible, dude"
Top = 2880
Visible = 0 'False
Width = 2655
End
End
Attribute VB_Name = "Form1"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Option Explicit
Dim z() As ALZipDir
Dim LibraryHandle As Long
Private Sub About_Click()
frmAbout.Text1 = "EX26VB demonstrates the simplified interface. Double click on a"
frmAbout.Text1 = frmAbout.Text1 + " zip file to display its contents. You can either"
frmAbout.Text1 = frmAbout.Text1 + " extract or delete the file from the archive."
frmAbout.Show 1
End Sub
Private Sub Command1_Click()
Unload Form1
End
End Sub
Private Sub Delete_Click()
Dim i As Integer
Delete.Enabled = 0
i = 0
While z(i).size <> -1
If List1.Selected(i) Then
z(i).mark = 1
Else
z(i).mark = 0
End If
i = i + 1
Wend
Delete.Enabled = 1
i = ALDelete(z(), 0, 0, JobProgress.hWnd)
File1_Click
End Sub
Private Sub Extract_Click()
Dim i As Integer
Extract.Enabled = 0
i = 0
While z(i).size <> -1
If List1.Selected(i) Then
z(i).mark = 1
Else
z(i).mark = 0
End If
i = i + 1
Wend
i = ALExtract(z(), 0, 0, 0, JobProgress.hWnd)
Extract.Enabled = 1
End Sub
Private Sub File1_Click()
Dim i As Integer
Dim count As Integer
Dim error As Integer
i = UBound(z, 1)
If z(i).compressed_size <> 0 Then ALFreeDir z
ALReadDir z(), File1.filename, count, error
List1.Clear
For i = 0 To count - 1
List1.AddItem z(i).name
Next
End Sub
Private Sub Form_Load()
File1.Path = App.Path
ChDrive App.Path
ChDir App.Path
LibraryHandle = LoadLibrary(DLLName)
If LibraryHandle < 32 Then
SSPanel1.Caption = "***ERROR LOADING " + DLLName + "***"
SSPanel1.FloodType = 0
End If
ReDim z(1)
End Sub
Private Sub Form_Unload(Cancel As Integer)
FreeLibrary (LibraryHandle)
End Sub
Private Sub JobProgress_Change()
SSPanel1.FloodPercent = Val(JobProgress.text)
End Sub