Reputation: 13
Please Stackoverflow community for help. I need to Extract the ZIP File without snagging the app.
Using zip1 As ZipFile = ZipFile.Read(".\packageData\" + zip.Text + ".zip")
Dim Z As ZipEntry
For Each Z In zip1
Z.Extract(".\apps\", ExtractExistingFileAction.OverwriteSilently)
Next
End Using
Upvotes: 0
Views: 137
Reputation: 1673
Run that unzipping operation in its own thread. For example using Task (in Windows Forms application):
Private Async Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim worker As New Task(Sub()
Using zip1 As ZipFile = ZipFile.Read(".\packageData\" + zip.Text + ".zip")
Dim Z As ZipEntry
For Each Z In zip1
Z.Extract(".\apps\", ExtractExistingFileAction.OverwriteSilently)
Next
End Using
End Sub)
worker.Start()
Await worker
MsgBox("Done.")
End Sub
Upvotes: 1