Hi Morten,
I recommend looking at my WTR application, it has a reusable class for
downloading ansync via HTTP complete with progress tracking.
http://www.members.lycos.co.uk/nickp...p/soft-wtr.htm
It's not fun cancelling one of those once it's waiting for the callback
to be fired, but it seems to work quite well in the application mentioned
above.
Nick.
"Morten Snedker" <morten_spammenot_ATdbconsult.dk> wrote in message
news:(E-Mail Removed)...
>I have this Class:
>
> Imports System.Net
> Public Class DownloadFile
> Private _webClt As WebClient
> Private _url As String
> Private _file As String
>
> Sub New(ByVal urlSource As String, ByVal fileDestination As
> String)
> _url = urlSource
> _file = fileDestination
> End Sub
> Sub DownloadFile()
>
> _webClt = New WebClient
> _webClt.DownloadFile(_url, _file)
> _webClt = Nothing
>
> End Sub
> End Class
>
>
> It works well. However, I wish to continuesly read the size of the
> file written (show activity for the user), but DownloadFile locks the
> application until it has finished downloading the file.
>
> How can I make the form-update independent from the download - or
> otherwise prevent the app from locking?
>
> Any other comments to my class is welcomed, since i'm new to .Net.
>
>
>
> Regards /Snedker