J
Joel Merk
When multithreading in my Windows form application, every time a non form
thread attempts to raise an event that modifies a control, I get an
exception. I understand that to avoid this, one way is to use the control's
Invoke method, with a delegate to the sub I would like to invoke. I was
wondering if there is any other way to avoid this problem, without having to
use an invoke for each event, because with a large number of events, it
starts to get confusing and relatively inefficient (if you ask me). I'd just
like to know if there's another way to raise events on the main form thread.
Thanks!
thread attempts to raise an event that modifies a control, I get an
exception. I understand that to avoid this, one way is to use the control's
Invoke method, with a delegate to the sub I would like to invoke. I was
wondering if there is any other way to avoid this problem, without having to
use an invoke for each event, because with a large number of events, it
starts to get confusing and relatively inefficient (if you ask me). I'd just
like to know if there's another way to raise events on the main form thread.
Thanks!