Hi,
Maybe a little late but I got things working quite easily.
First of all, I would suggest to rewrite your event handler line like this:
AddHandler MyZip.ExtractProgress, AddressOf Zip_ExtractProgress
You just want to point the event to the sub
Zip_ExtractProgress
.
Next, you'll need to define the type of verbose info that's provided by the event.
So you would have:
Private Sub Extract_Zipfile(ByVal sourcePath As String, ByVal targetPath as String)
Dim fileToExtract as ZipFile
fileToExtract = ZipFile.Read(sourcePath)
With fileToExtract
.UseUnicodeAsdNecessary = True
AddHandler .ExtractProgress, AddressOf Zip_ExtractProgress
fileToExtract.ExtractAll(ExtractTo, Ionic.Zip.ExtractExistingFileAction.OverwriteSilently)
End With
End Sub
Private Sub Zip_ExtractProgress(ByVal sender As Object, ByVal e As ExtractProgressEventArgs)
If e.EventType = ZipProgressEventType.Extracting_BeforeExtractEntry then
pgbFileExtractProgress.Maximum = 100
pgbFileExtractProgress.Value = Convert.ToInt16((e.BytesTransferred / e.TotalBytesToTransfer)*
End If
Application.DoEvents()
End Sub
That should do the trick...