Hi all,
New to .Net
I am facing a dilemma with respect to understanding a proper structure, and solving a specific issue.
I have a code module that I didn't write, that creates a TCP socket, and I am blissfully able to send data between client/server. It used the console window.
I wanted to move that behavior to a text box in a form.
To test this, I wrote (in the module):
form1.textbox1.text = "Hello"
The code could not find the textbox... which to me is hard to understand why... but upon researching this, many have suggested that perhaps the code using the textbox, should be in the same place. So, I tried to copy all of the code from the module, to the Form code (in main()), and it's throwing an error...
"No accessible 'Main' method with an appropriate signature was found in 'SocketServer2'."
So it seems, either way I try this... I'm getting a bucket load of fail. This brings up the more basic question...
Which way SHOULD this go? I kind of think that the socket module should be an object all its own, and just communicate (somehow) to the form.
Would I be adding a method to the form, that handles incoming strings... routing them to the text box? How would I call such a method from the socket module?
I'm sure part of my struggle is syntactic... so if you have a specific suggestion for something, like calling a method, might you please include an example of what that would look like?
I'm trying my best here... but this .Net is really killing me.
Thanks ever so much for your patience with a noob.
RS
New to .Net
I am facing a dilemma with respect to understanding a proper structure, and solving a specific issue.
I have a code module that I didn't write, that creates a TCP socket, and I am blissfully able to send data between client/server. It used the console window.
I wanted to move that behavior to a text box in a form.
To test this, I wrote (in the module):
form1.textbox1.text = "Hello"
The code could not find the textbox... which to me is hard to understand why... but upon researching this, many have suggested that perhaps the code using the textbox, should be in the same place. So, I tried to copy all of the code from the module, to the Form code (in main()), and it's throwing an error...
"No accessible 'Main' method with an appropriate signature was found in 'SocketServer2'."
So it seems, either way I try this... I'm getting a bucket load of fail. This brings up the more basic question...
Which way SHOULD this go? I kind of think that the socket module should be an object all its own, and just communicate (somehow) to the form.
Would I be adding a method to the form, that handles incoming strings... routing them to the text box? How would I call such a method from the socket module?
I'm sure part of my struggle is syntactic... so if you have a specific suggestion for something, like calling a method, might you please include an example of what that would look like?
I'm trying my best here... but this .Net is really killing me.
Thanks ever so much for your patience with a noob.
RS