If I am setting the Text property of a Form from a non-UI thread, then I need to use Invoke to avoid a cross-thread error. But, I can read the Text property without using Invoke. Is this safe? If I try to read the Handle property of a Form I get a cross-threading error. If I read the IsDisposed property of a Form it works fine. How can I tell when I need to use Invoke? Should I always be using Invoke to read and write property values?
Share
Whenever you are in a thread other from the UI thread you should use
Invokewhen accessing UI objects. UseInvokeRequiredproperty to find out if you are in fact, in a different thread.