How to change the value of progressbar in C#?

Posted by shekhar on Stack Overflow See other posts from Stack Overflow or by shekhar
Published on 2010-03-19T12:01:53Z Indexed on 2010/03/19 12:11 UTC
Read the original article Hit count: 157

Filed under:
|
|

Hi,

I want to add an progress bar into my C# based application. I would like to know what is the good way of updating its value at particular events? My problem is, I have single function in UI which does all the processing.This function in turn calls many more functions, creates objects, updates database, etc. (basically performs all the work) and returns values in an output file. I have access to that function only. So in this how to update the progressbar's value at the end of each step?

What is the best practice for this kind of situation? What is the good way to keep UI logic and business logic seperate? I want to avoid writting progressbar related code in my library code.


Please suggest some solution. Thanks and Regards,

© Stack Overflow or respective owner

Related posts about c#3.0

Related posts about progressbar