Closed Mrgaton closed 3 years ago
This isn't a bug.
By default, events are emitted on the thread that created them (the IO thread). You cannot update WinForm elements from different threads.
There are multiple solutions to this problem. A quick google search for the issue would have lead you to this solution.
The documentation contains further reading about how events work.
a bug in rpc tryng to change a form label form ready i have thath code but when i tried to run it i have this error
System.InvalidOperationException: Invalid operation through threads: The control 'BiembenidaLabel' was accessed from a different thread than the one in which it was created. in System.Windows.Forms.Control.get_Handle () in System.Windows.Forms.Control.set_WindowText (String value) in System.Windows.Forms.Control.set_Text (String value) at K1R4FN.K1R4FN. d__34.MoveNext () at C: \ Users \ Mrgato \ source \ repos \ K1R4FN \ K1R4FN \ K1R4FN.cs: line 261