|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
DownloadFileAsync Thread IssuesTrying to encapsulate the WebClient class and DwonloadFileAsync method in a separate class/assembly (business object), so that I can download and keep track of multiple downloading files. Is there any way to marshall the data (progress, completed) info, back to a WinForms assuring that my WinForm controls will be updated on the thread upon which they are created as to avoid CrossThreading issues. I have been beating my head for 4 days and tried almost everything under sun, but to no avail. I'd like to specify an indicator control per class instance so that each file's progress indicator is updated accordingly and safely. I also tried using the BackgroundWorker, but I thought that since DownloadFileAsync already runs on another thread, it would be overkill. I just need to know how to marshall info of the DownloadFileAsync method (in a separate assembly), back to the UI thread of a WinForms application while specifying an indicator control to update (progrssbar, etc...) Regards, Giovanni TMK, there is only a completed event, not a progress event.
-- Show quoteWilliam Stacey [MVP] "Giovanni" <Giova***@discussions.microsoft.com> wrote in message news:0DCAF2A1-3A59-4383-9BFD-741A12F5847B@microsoft.com... | Hi All, | | Trying to encapsulate the WebClient class and DwonloadFileAsync method | in a separate class/assembly (business object), so that I can download and | keep track of multiple downloading files. Is there any way to marshall the | data (progress, completed) info, back to a WinForms assuring that my WinForm .... |
|||||||||||||||||||||||