So, I have a stream in my application, the purpose of which is to listen to messages from the server and act in accordance with what it receives.
I had a problem when I wanted to disconnect a message from the server that when the client application receives it, the client application will open a new form. However, this new form instantly freezes.
I think what happens is that the new form is loaded into the same stream as the stream listening on the server, which, of course, is busy listening to the stream, which in turn blocks the stream.
As a rule, for my other functions in the client listening thread, I would use calls to update the user interface of the main form, so I assume that I ask if this is a way to invoke a new form on the main form.
multithreading c # invoke winforms
Dan
source share