C # progress bar not synchronized with download (WebClient class)

I am encoding a system with a small FTP module included inside, this is not the main function at all, but I need ...

I have to associate the progress bar with the event of the WebClient class DownloadProgressChangedEventHandler and AsyncCompletedEventHandler, the progressbar step is fine, and ASyncCompletedEventHandler fired a MessageBox (as expected), the problem is that the progress bar looks too slow ...

problem:

My MessageBox appears at 100% (triggered by an event handler), BUT when the MessageBox is sung, the progress bar only works at + 80% (but .VALUE is really 100), the first, although I had it, was that they added a “smooth” effect in Windows Vista, which slows down the progress bar relative to the true value.

If you have the same problem, thanks for your help.

+3
source share
3 answers

For those of you who want to know, Vista actually adds “anti-aliasing” to the load change, this is similar to the “Tweening effect” for Flash.

Windows XP, 100%, 100. Vista , , "" X.

+1

, Application.DoEvents(), Windows , . , , .

0

100% DownloadProgressChangedEventHandler, ?

0

Source: https://habr.com/ru/post/1749631/


All Articles