1

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?

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
  • possible duplicate of [Pause/Resume Upload in C#](http://stackoverflow.com/questions/1048330/pause-resume-upload-in-c-sharp) – shf301 Mar 01 '15 at 19:09

0 Answers0