I'm trying to write a chat client in C# and have run into a problem.
How it works is that the client polls the server every 1 second to see if there are any new actions to take (for example display a message in a channel, or whatever). The polling is done in a thread of its own.
Now, I want the polling thread to open a new MDI form when a channel open action is received (meaning the user has entered a new channel). The thing is, the new form should run on the MAIN program thread, and not on the worker thread.
So basically I'm asking, how do I create a new windows form, and associate it with an already existing thread? (instead of the thread that created it).
Also, if you know of a better way to do this, please tell me. I love improving my program architecture!
Thanks all