Progress bar quiestion

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
 
C

Cor Ligthert

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
 
H

Herfried K. Wagner [MVP]

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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top