Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.36 KB | None | 0 0
  1. ' Called periodically during the Unzip
  2. Private Sub ZipFile_UnzipPercentDone(ByVal percentComplete As Long, abort As Long)
  3.     ProgressBar.ProValue = percentComplete
  4.     DoEvents
  5.     ' Set abort = 1 to abort the Unzip
  6. End Sub
  7.  
  8.  
  9. Private Sub cmdInstall_Click()
  10.  
  11.     Dim success As Long
  12.     lstMenu.Enabled = False
  13.     cmdInstall.Enabled = False
  14.     ProgressBar.ShowValue = True
  15.    
  16.     ' Create a ChilkatZip object
  17.     Set ZipFile = New ChilkatZip2
  18.     ZipFile.UnlockComponent "ZIPT34MB34N_7FDC82AAp8pG"
  19.     success = ZipFile.OpenZip(FileServer)
  20.     If (success = 0) Then
  21.         MsgBox ZipFile.LastErrorText
  22.         Exit Sub
  23.     End If
  24.    
  25.     lblResult.Caption = "Install in Progress! Please Wait!"
  26.     lblResult.Refresh
  27.    
  28.     ' Unzip the entire archive into the specified directory, creating the
  29.     ' the subdirectories (if any) automatically.
  30.     ProgressBar.ProValue = 0
  31.  
  32.     ' Do the unzip.
  33.     Dim count As Long
  34.  
  35.     count = ZipFile.Unzip(GameDir)
  36.     If (count = -1) Then
  37.         ' The unzip failed
  38.         MsgBox ZipFile.LastErrorText
  39.         ZipFile.CloseZip
  40.         Exit Sub
  41.     End If
  42.    
  43.     lblResult.ForeColor = vbGreen
  44.     lblResult.Caption = "Install Successfull!"
  45.  
  46.     ZipFile.CloseZip
  47.     ProgressBar.ProValue = 0
  48.     ProgressBar.ShowValue = False
  49.     cmdInstall.Enabled = True
  50.     lstMenu.Enabled = True
  51.    
  52. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement