可能重复:
Cross-thread operation not valid
我正试图从另一个线程关闭表单的底部。我得到了以下错误。
System.InvalidOperationException:跨线程操作无效:控制从创建线程以外的线程访问的'MDIParent‘。
关于下一栏:
MDIParent.MDIParentRef.BaseClose();发布于 2009-09-09 03:18:29
您需要对UI线程执行操作:
if (InvokeRequired)
Invoke(new Action(MDIParent.MDIParentRef.BaseClose));
else
MDIParent.MDIParentRef.BaseClose();https://stackoverflow.com/questions/1397370
复制相似问题