Progress bar update on large files

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there an efficient way of copying a file and at the same time updating a
progress bar with short intervals to see how much is still to copy of the
file? Like some FTP programs have for instance.
 
I have done someting like that, and the best way I found, whast to, use a
timer to check the state of the copy, the copy was in a thread, and work
very well, other way is, in the same thread signaling and event, about the
progres.

If you are in the framework 2.0 there is a class that handles much of this,
for coping files, from a remote machine, to the local one.

Regards,

Bela Istok
 
Thank you Bela,
If you are in the framework 2.0 there is a class that handles much of this,
for coping files, from a remote machine, to the local one.

Which class do you mean?

Regards,
Joachim
 
You can also use a background worker component that's more efficient than a
timer since it does not tie up the main UI thread. You can set the progress
method and the actual method that does the work. The work method can then
update the progress percentage in the event args that gets passed in and the
progress method will get an asynchronous notification.

For more info, see http://msdn2.microsoft.com/en-us/library/8xs8549b.aspx

--
Good luck!

Shailen Sukul
Architect
(BSc MCTS, MCSD.Net MCSD MCAD)
Ashlen Consulting Service P/L
(http://www.ashlen.net.au)
 
Back
Top