Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ' Called periodically during the Unzip
- Private Sub ZipFile_UnzipPercentDone(ByVal percentComplete As Long, abort As Long)
- ProgressBar.ProValue = percentComplete
- DoEvents
- ' Set abort = 1 to abort the Unzip
- End Sub
- Private Sub cmdInstall_Click()
- Dim success As Long
- lstMenu.Enabled = False
- cmdInstall.Enabled = False
- ProgressBar.ShowValue = True
- ' Create a ChilkatZip object
- Set ZipFile = New ChilkatZip2
- ZipFile.UnlockComponent "ZIPT34MB34N_7FDC82AAp8pG"
- success = ZipFile.OpenZip(FileServer)
- If (success = 0) Then
- MsgBox ZipFile.LastErrorText
- Exit Sub
- End If
- lblResult.Caption = "Install in Progress! Please Wait!"
- lblResult.Refresh
- ' Unzip the entire archive into the specified directory, creating the
- ' the subdirectories (if any) automatically.
- ProgressBar.ProValue = 0
- ' Do the unzip.
- Dim count As Long
- count = ZipFile.Unzip(GameDir)
- If (count = -1) Then
- ' The unzip failed
- MsgBox ZipFile.LastErrorText
- ZipFile.CloseZip
- Exit Sub
- End If
- lblResult.ForeColor = vbGreen
- lblResult.Caption = "Install Successfull!"
- ZipFile.CloseZip
- ProgressBar.ProValue = 0
- ProgressBar.ShowValue = False
- cmdInstall.Enabled = True
- lstMenu.Enabled = True
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement