Events and Threads

  • Thread starter Thread starter Martin Groh
  • Start date Start date
M

Martin Groh

Hey,

I'm trying to find a way to raise events from a thread or a delegate in such
a way that it will not require the use of invoke when you are updating the
gui. In other words, make the event delegate trigger form the caller thread.
Today I'm doing this by finding the main form and invoking the event
delegate for there. But this method seems "to dirty" to be the best
solution.
Does anybody know a proper way to do this, or what I have to look for?
I have seen this done in a couple of libraries, but I don't have access to
the code behind them.

Regards Martin
 
Hello Martin,

you could assigne a "control" to your thread class and then use the
<control>.BeginInvoke(..).

Regards
Rainer
 
Back
Top