0

i have 2 classes in different threads,"A" and "B". "A" creates Windows forms controls and "B" is the GUI thread. At some point "A" listens to an event fired in "B" then it uses:

      MethodInvoker m22 = new MethodInvoker(() => flow.Controls.Add(myobj));
        flow.Invoke(m22);

That adds "myobj" thats created in "A" to flow thats a control created in "B".

The error: I get an error because its accessing myobj from a different process that the process where it was created.

Is the event starting a new process? Thanks

0 Answers0