Reading form properties on a background worker thread.

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

Guest

In a multithreaded windows form application I know that if I'm changing any
UI aspect of a form that I must do it on the same thread that created it.
But, what about reading these properties? Are form properties safe to read
from a different thread?

Cheers
 
Gravy said:
In a multithreaded windows form application I know
that if I'm changing any UI aspect of a form that I must
do it on the same thread that created it. But, what about
reading these properties? Are form properties safe to read
from a different thread?

No. You'll have to use 'Control.Invoke'/'Control.BeginInvoke', ...
 
Thanks Herfried,

one more question though. Is it possible to declare a delegate that maps to
a property get or set?
 

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