Threadsafe control wrapper

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

Has anyone implemented a threadsafe UserControl or Form wrapper? I want to
provide an easy way of calling in to a windows forms control from a worker
thread without having to declare loads of delegates in the worker thread.

Regards
 
Gravy said:
Hi,

Has anyone implemented a threadsafe UserControl or Form wrapper? I want to
provide an easy way of calling in to a windows forms control from a worker
thread without having to declare loads of delegates in the worker thread.

Such a wrapper would have to wrap every single Form or UserControl property.

The better idea is to isolate the interface for updating your UI so that you
don't have you background thread randomly touching the UI. Once you've got
that narrowed down to a smaller number of UI-affecting methods, it won't be
so difficult to use delegates for Invoke.

John Saunders
 

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

Back
Top