Webclient.UploadFile with Progress bar?

  • Thread starter Thread starter Matthias Haberkorn
  • Start date Start date
M

Matthias Haberkorn

Hello,

I use the Webclient.UploadFile but what have i to do to display an progress
bar? I didn't find any thing at webclient...

Thanks for help
Greetings
Matthias
 
Matthias said:
Hello,

I use the Webclient.UploadFile but what have i to do to display an
progress bar? I didn't find any thing at webclient...

It's a HTTP client class, not a UI component. If you need to display a
progress bar, use its async methods to track the upload or download
status.

Cheers,
 
Thanks for your answer,

but do you have some good examples or links for me?

Greetings
Matthias
 
Matthias said:
Thanks for your answer,

but do you have some good examples or links for me?

Greetings
Matthias

Guess what... there's a great sample in the *WinFX* docs :-O

http://winfx.msdn.microsoft.com/library/en-us/dv_fxsamples/local/sampleh
tmlsources/Technologies/WinForms/EventBasedAsyncSample/CS/EventBasedAsyn
cSampleCS/AsyncWebClientForm.cs.asp

I had a brief look at it and didn't spot anything that isn't available
in .NET 2.0.

The only caveat here is that the sample blissfully ignores a ground
rule of multithreaded UI programming. Don't update controls on other
than their creator threads. See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide
/html/cpconDevelopingMultithreadedWindowsFormsControl.asp.

Cheers,
 
Back
Top