i have a TCP server app and have a thread for communicating with TCP clients. When i receive a data from a client i want to create a new form by using this data but i can not create the form in a thread. I can easily create the form using button click event.
Where am i wrong?
Thank you.
To avoid such situations, it is better to let the applications original UI-thread handle the creation of new forms and not have multiple UI-threads. Fortunately, you can invoke operations on that thread.
See here on how to do it on WinForms or here to do it in WPF/Silverlight.