Quote:
Originally Posted by Baler
[You must be logged in to view images. Log in or Register.]
Is there a source for this?
|
sure.. i don't mind sharing .. its pretty simple..
Private Sub btn_Update_Click(sender As Object, e As EventArgs) Handles btn_Update.Click
On Error GoTo ErrorHandler ' Enable error-handling routine.
If Len(txt_Path.Text) = 0 Or Len(txt_Game_File_Path.Text) = 0 Then
'do nothing
Else
Using archive As ZipArchive = ZipFile.OpenRead(txt_Path.Text)
For Each entry As ZipArchiveEntry In archive.Entries
entry.ExtractToFile(Path.Combine(txt_Game_File_Pat h.Text, entry.FullName), True)
Next
End Using
On Error Resume Next
sys_label.Visible = True
End If
Exit Sub
ErrorHandler: ' Error-handling routine.
Select Case Err.Number ' Evaluate error number.
Case 6 ' Divide by zero error
MsgBox("You attempted to divide by zero!")
' Insert code to handle this error
Case Else
' Insert code to handle other situations here...
End Select
Resume Next ' Resume execution at the statement immediately
' following the statement where the error occurred.
End Sub