G
Guest
I have a Windows Forms application with a ProgressBar control on a form.
In that form, I create a new process to run another program. I register an
event handler for the Exited() event.
I start the progressbar scrolling (Marquee) and start the process.
When the process exits, I want to stop the progress bar. However, when I try
to access the ProgressBar control, I get a System.InvalidOperationException.
"Cross-thread operation not valid: Control 'progressBar1' accessed from a
thread other than the thread it was created on."
What can I do in this case to access the progressBar?
Thanks,
Jeff
In that form, I create a new process to run another program. I register an
event handler for the Exited() event.
I start the progressbar scrolling (Marquee) and start the process.
When the process exits, I want to stop the progress bar. However, when I try
to access the ProgressBar control, I get a System.InvalidOperationException.
"Cross-thread operation not valid: Control 'progressBar1' accessed from a
thread other than the thread it was created on."
What can I do in this case to access the progressBar?
Thanks,
Jeff