DeveloperJr
Programmer
I have a form Form1 that instantiate an object Obj1 which in charge of doing some lengthy process from within a method called Obj1.method1
What I need is to be able to communicate the progress status from Obj1.method1 to Form1. For that purpose, I wrote a method in the form that updates the progress bar, defined a delegate in the form, pass the delegate to the Obj1.method1, use delegate inside the method to update the progress bar. The same old stuff, it works great and the progress bar tells me where I am. But, if I hide the form, my screen saver kicks in, open another program over the form or even click on my form, the form blanks out along with the progress bar. How can I avoid that? Can I instantiate the Obj1 on a separate thread?
Please advice
What I need is to be able to communicate the progress status from Obj1.method1 to Form1. For that purpose, I wrote a method in the form that updates the progress bar, defined a delegate in the form, pass the delegate to the Obj1.method1, use delegate inside the method to update the progress bar. The same old stuff, it works great and the progress bar tells me where I am. But, if I hide the form, my screen saver kicks in, open another program over the form or even click on my form, the form blanks out along with the progress bar. How can I avoid that? Can I instantiate the Obj1 on a separate thread?
Please advice