Progress bar quiestion

  • Thread starter Thread starter Nikolay Petrov
  • Start date Start date
N

Nikolay Petrov

In many examples about progress bars i've seen that a loop is used to change
the progress bar value.

What if I want to show a progress bar for an operation that does not have
loops?

Like writing big file to disk. How to do that?

Also how to show the progress of a thread, which also don't have loops?


Thanks
 
Nikolay,

There was a short discussion two days ago about that in the ADONET
newsgroup.

You can use that progress bar for this kind of operations, however that cost
extra time. (You can byinstance use a writeline instead of a write)

There is in the SDK part of visual studioNet an avi that shows that copy
process as it is often done.

Just my thought,

Cor
 
Nikolay said:
In many examples about progress bars i've seen that a loop is used to change
the progress bar value.

What if I want to show a progress bar for an operation that does not have
loops?

Like writing big file to disk. How to do that?

If you write the file in chunks of ceratin size, you can set the
progressbar's value accodingly.

If there in no way to determine the progress of an operation, you may
want to use a marquee progressbar:

Displaying a progressbar control in marquee mode
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=marqueeprogressbar&lang=en>
 
Back
Top