The texbox does not display "Connecting..." until after the connection has timed out/connected.
Code:
 public void Connect(string hostname) {
            textBox3.Text += "Connecting..." + n;
            cSoc = new TcpClient();
            try
            {
                cSoc.Connect(hostname, 8888);
            }
            catch (System.Exception)
            {
                success = false;
                button5.Enabled = false;
                textBox3.Text += "Connection timed out at address \"" + hostname + "\"";
            }
            if (success == true)
            {
                textBox3.Text += "Connected to server at(" + hostname + ")" + n;
            }
            try
            {
                serverStream = cSoc.GetStream();
            }
            catch (System.Exception)
            {
                
            }
        }