Why does the progress bar disappear when the style is changed from within a thread and how can I avoid having this happen?
I have a thread that runs for an indeterminate (but potentially lengthy) amount of time, so I wanted to use the progress bar to track the thread's progress. I set the progress bar style to marquee before starting the thread to start, however once the thread finishes and sets the progress bar style back to blocks (which you can do from another thread by setting Form.CheckForIllegalCrossThreadCalls = false) the progress bar disappears from the form visually. Additionally, if I put a button on my form for the express purposes of changing the progress bar style back and forth, it will reappear, and change style back and forth as the button is pressed successively.