Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / March 2006

Tip: Looking for answers? Try searching our database.

DownloadFileAsync Thread Issues

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Giovanni - 07 Mar 2006 21:50 GMT
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
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
William Stacey [MVP] - 08 Mar 2006 04:06 GMT
TMK, there is only a completed event, not a progress event.

Signature

William Stacey [MVP]

| 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
...

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.