|
Are you sure your Connect button is even wired up to your event handler?
I know you said you're not stupid, but that's the only way I can see that you won't get a message saying either "Connecting to server..." or "Can't connect to server...".
Slightly off-topic, I can only think that the only reason people use sockets is that they've never come across ZeroMQ. See this thread:-
http://www.codeproject.com/Forums/1649/Csharp.aspx?fid=1649&fr=276#xx0xx[^]
modified 22-Jan-13 2:14am.
|
|
|
|
|
Regarding the handler for the connect button.
if (connectButton.Text == "Connect" && usernameBox.Text != "")
When you set a breakpoint on that line (You have set a breakpoint and stepped through your code, right? You said you know the basics!) What is the value of connectButton.Text and usernameBox.Text ?
|
|
|
|
|
I did and got a message window from VS
Entering break mode failed for the following reason: Sourse file C\Users\*********\Program.cs does not belong to the project being debugged
Usually, this condition occurs when the project was not rebuilt prior to starting the debugging session, when the assembly file for the prohect is out of date, or when the oroject source files wre moved to a different disk location between the time the project was built and the debugging session was started
|
|
|
|
|
So you "know the basics" but you are clueless on how to debug your program?!?
|
|
|
|
|
Put a breakpoint on the line :
if (connectButton.Text == "Connect" && usernameBox.Text != "")
and see what happens when you click the button.
|
|
|
|
|
Hmmm...all gone quiet.
I suspect he's now realised that he's dropped a clanger & not wired up his event handler
|
|
|
|