Jump to content

Cross-thread operation not valid on BackgroundWorker Error

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
efadrian

efadrian

    Newbie

  • Members
  • Pip
  • 2 posts
Hy,
I have a BackgroundWorker from where I start a function that is doing a loop with some time consuming activity.

The problem is that from there its moving some controls like a progress bar and progress status text, and there it gives me an error, like this:

Cross-thread operation not valid: Control 'frmA' accessed from a thread other than the thread it was created on.

What can I do to, i tryed to invoke the controls but is not working...
Thanks!
Adrian

#2
Vswe

Vswe

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 9,552 posts
That's the problem, that you're moving controls around. Those controls was created by the main thread so you can't move it by any other thread.