Events and Threads

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
 
R

Rainer Queck

Hello Martin,

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

Regards
Rainer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top