private void SendTextBox_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { e.Handled = true; e.SuppressKeyPress = true; if (sendTextBox.Text.Length > 0) { string msg = sendTextBox.Text + Environment.NewLine; sendTextBox.Clear(); //telnet.LogWrite("<- Server (You) -> " + msg); telnet.SendBackMessage(msg); } } }