阅读背景:

如何判断属性是否需要Invoke?

来源:互联网 

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 If I am setting the Text property of a Form fro




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: