Imports System.Net Public Class Form1 Private WithEvents httpclient As WebClient Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Button1.Enabled = False httpclient = New WebClient AddHandler httpclient.DownloadFileCompleted, AddressOf Downloaded httpclient.DownloadFileAsync(New Uri("https://www.download source.com/call.zip"), ("C:\download\call.zip")) End Sub Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load persent.Text = "" End Sub Private Sub dpc(ByVal sender As Object, ByVal e As System.Net.DownloadProgressChangedEventArgs) Handles httpclient.DownloadProgressChanged persent.Text = e.ProgressPercentage End Sub Private Sub Downloaded() If System.IO.File.Exists("C:\download\call.zip") = True Then Process.Start("C:\download\call.zip") Else MsgBox("Doesn't exist", 64, "Open") End If End Sub End Class
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)