I've made my Visual Basic 2013, Internet Downloader windows form Application It's working and downloading but i want to add a Pause / Resume Buttons
Dim theResponse As HttpWebResponse
Dim theRequest As HttpWebRequest
theRequest = WebRequest.Create(Me.txtFileName1.Text)
theResponse = theRequest.GetResponse
If Me.BackgroundWorker1.CancellationPending Then
IO.File.Delete(Me.whereToSave)
Dim cancelDelegate As New DownloadCompleteSafe(AddressOf DownloadComplete)
Me.Invoke(cancelDelegate, True)
Exit Sub
End If
Dim completeDelegate As New DownloadCompleteSafe(AddressOf DownloadComplete)
Me.Invoke(completeDelegate, False)
but it only can Cancel and Resume
Me.BackgroundWorker1.CancelAsync()
Me.BackgroundWorker1.RunWorkerAsync()
How can I make a Pause and Resume Backgroundworker HTTPWebRequest pause the download and resume it later?