在 C# winform 应用程序中,我在对象调用的堆栈树深处的 doWork 方法中有一个后台工作者
// This is ok to be called on non UI thread because
// MessageBox has its own message pump
result = MessageBox.Show(form, message, AppStrings.low_space_title, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
评论来自以前的开发人员,这段代码显然有效,现在它似乎不再工作了..我得到的错误是
Cross-thread operation not valid: Control 'FormMain' accessed from a thread other than the thread it was created on.
任何帮助将不胜感激
谢谢,