Before calling the function you need to do two things:
1) Either the record the time or create and start a Stopwatch in a class
level variable (function level is you use an anonymous function for part 2)
2) Add an event handler to the DownloadProgressChanged event.
3) When the event is fired, the DownloadProgressChangedEventArgs has
BytesReceived property, you can then see either
a) how much has been downloaded and the elasped time since the last time the
event was fired for a current rate, or how much since the start of downlaod
to get an average rate for the file (less helpful to a watching user of
course).
The DownloadProgressChangedEventArgs also has the TotalBytesToReceive
property which you can use along with the speed to work out the time
remaining.
Hope this helps
--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"greatbarrier86" wrote:
Hi,
I know there isn't a specific event property for the download speed, but can
anyone tell me how to find it? I'm not sure how to write the code.
Thanks,
Jason