Disclaimer: I'm new at C# so please be gentle. :-)
I'm writing a simple card game where two players play against each
other through a middle hand they both connect to. In the client (the
player) I read messages from the middle hand in an asynchronous
fashion. I ran into a problem when I tried to implement the player
repsone to the play card message and I need your help.
When the player gets the play card message I want to display a simple
dialog box displaying the cards he or she has available for play.
However, during runtime I get an InvalidOperationException when I
attempt to show the dialog. The more precise error message is, and
here I translate to english: The action between threads is not valid.
The control collected/gathered from another thread than the one it was
created on. Is it because the control (the dialog) tries to use an
object, created by the "main" form, holding the players cards? How
should I solve this in a proper way?
Thanks for reading and thanks for any replies!
- Eric