communicate with progressbar

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

Guest

Is there a way for code from one class of C# to send a communication to a
progressbar in another class to update the bar during runtime?
 
Yes, one option is that you have an instance of the progressbar's class, and
that instance of a class is exposing some method to allow updating the
progress bar's value.

Another option, is to fire an event for value updating from one class and
handle it in the progressbar's class.
 
Hi Steve,

You could use any of these steps:
1. Either expose a public method in the class which would accept a value for
the progress.
2. Call a delegate passing the value, which is hooked into a method which
updates the progress bar
3. Call an event of the delegate type, passing the value.

HTH,
- Rakesh Rajan
 

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

Back
Top