Call method on a form from another thread

C

C.C. \(aka Me\)

I am looking for a sample of how you execute/invoke a method in a form from
one thread and have it run on the thread that created the form instead of
the thread that actually made the call. The reason I need this is because
the method that gets invoked could be updating any number of GUI elements on
the form.

What would be ideal is to have the code in the thread an not the form since
I will have several of these forms.

Also, do delegates perform this action themselves? What I mean is if I
delegate is declared as part of one thread but a handler is registered by
another thread does it make sure it executes on the correct thread?

Thanks.
 

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

Top