using progress bar

S

steve

I am trying to use a progress bar to allow the user to see the
processing of a task. The routine to do the specific task is pretty
simple and the cod runs in a few seconds, but want a progress bar. Not
sure how to do this since there isn't any file length used BUT
approximetly 40 files are "processed" into a single file. I assume I
would need to do some type of thread.sleep(??) command in the progress
bar update somewhere...

Thanks for any advise on this one.
 
P

Pavel Minaev

I am trying to use a progress bar to allow the user to see the
processing of a task. The routine to do the specific task is pretty
simple and the cod runs in a few seconds, but want a progress bar. Not
sure how to do this since there isn't any file length used BUT
approximetly 40 files are "processed" into a single file. I assume I
would need to do some type of thread.sleep(??) command in the progress
bar update somewhere...

Since you mention threads, I assume you want to run your operation on
a background thread, so that it doesn't block the UI, while updating
the progress bar as needed. If that is correct, have a look at
BackgroundWorker class - it is designed precisely for such occasions.
If you have any _specific_ questions regarding the use of
BackgroundWorker, after you've read MSDN docs on it, feel free to ask.
And if I'm wrong in my assumption, then perhaps you need to clarify
what exactly you're trying to achieve.
 

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