I have an windows form app with a textbox. In a second class I have a socket server and client connection. The idea is when a connection is made to the server port the network stream is sent on through the client to a destination port. I would like to display this data (an xml message) along with any responses in the text box in my form. After searching it seems I need to use a delegate pointing to a method which will update the textbox. In my form I have created the method:
public void update_txtBox(string data)
In the socket class I get the network stream and send it to the destination port but am struggling to write the data to the textbox.
public delegate void AddText(string data);
AddText updateTextBox = new AddText(Form1.update_txtBox);
Am I on the right track?
Do I declare the delegate in the form class or the socket class or either?
In which class do I declare the delegate variable and is my attempt above correct? (it doesn't work so probably not :)
Any help or a pointer to a good tutorial/explanation will be appreciated.
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
How to fix incompatible JVM issue while installing Eclipse
While installing Eclipse in windows, got one error like above and unable to proceed with the installation.
This video describes how to successfully install Eclipse.
How to solve incompa…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…