2017-02-27 44 views
-1

「System.InvalidOperationException」類型的未處理的異常出現在System.Windows.Forms.dll中有麻煩與連接到電報機器人用C#

其他信息:跨線程操作無效:控制「LABEL1 '從其創建線程以外的線程訪問。

enter image description here

+1

顯示一些代碼,所以我們會知道如何幫助你 –

+0

[我怎麼問** **好問題?(http://stackoverflow.com/help/how-問題) –

+0

[Cross-thread operation not valid:Control from a visit to a thread that's not that it is created on on線程](http://stackoverflow.com/questions/142003/cross-thread-operation-not -allen-control-from-a-thread-other-than-the) –

回答

0

如果你需要使用invoke方法做更新的GUI線程(主線程)在控制一個WinForms應用程序。您試圖從後臺線程更新控件。

嘗試像label1.Invoke(() =>{ ... });