I put a progressbar in the main form's status bar. My program needs to do a long calculation in a worker thread which should update the progressbar to show its progress.
Now i am trying to pass the main form to the thread, then call the "mainForm.statusBar.StatusProgressPerformStep();" from the worker thread. But it doesn't work sometime. What is the problem? What should be a right and efficient way to do such job?
Now i am trying to pass the main form to the thread, then call the "mainForm.statusBar.StatusProgressPerformStep();" from the worker thread. But it doesn't work sometime. What is the problem? What should be a right and efficient way to do such job?