G
Guest
Hi ,
I build an object with a method and an event.
In the method, I start a thread(child thread) and after a long process, the
event is raised (from the child thread unfortunately).
When I use this object in my form (main UI thread), I get an error which
tells me to use Textbox.Invoke (which I understand and I know how to solve
the error from my form). No problem.
The problem is I want the event to be raised in main thread, so no
Textbox.Invoke error will be thrown in my form.
I mean when the child thread wants to raise the event, I want to tell to use
the main thread of my object instead of the child thread.
So no Textbox.Invoke required in my main UI thread.
Thanks in advance for your help.
I build an object with a method and an event.
In the method, I start a thread(child thread) and after a long process, the
event is raised (from the child thread unfortunately).
When I use this object in my form (main UI thread), I get an error which
tells me to use Textbox.Invoke (which I understand and I know how to solve
the error from my form). No problem.
The problem is I want the event to be raised in main thread, so no
Textbox.Invoke error will be thrown in my form.
I mean when the child thread wants to raise the event, I want to tell to use
the main thread of my object instead of the child thread.
So no Textbox.Invoke required in my main UI thread.
Thanks in advance for your help.