Quantcast
Viewing all articles
Browse latest Browse all 27020

VS 2012 Adding a Handler to a webclient

I have been running into problems with having Webclient dragged into. Instead I have a similar setup but I am declaring the webclient in a instance(top of the form, public).

I am trying to access DownloadProgressChanged

Code:

    Dim webone As New Net.WebClient
    Private Function DownloadProgressDetect() As String
        AddHandler webone.DownloadProgressChanged, AddressOf webone.DownloadProgressChanged
        Return True
    End Function

I can't seem to use the other way where its not declared and part of the form. I get a super error within the application form. As of now I would like to get it to work with the declared. So How can I access webone.DownloadProgressChanged so I can then get a toString representation of the progress of a download.

Viewing all articles
Browse latest Browse all 27020

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>