-
Hello all. I'm making a simple client application that sends keystrokes to a server (it's an exchange server if anyone cares to know) everytime a key is pressed in a text box. Here is what the code looks like:
Private Sub txtSend_KeyPress(KeyAscii As Integer)
tcpClient.SendData Chr$(KeyAscii)
End Sub
Here is the problem: characters are being sent just fine, but when I press enter (code: 13) the server doesn't pick up on it. What am I doing wrong?
-
If its a microsoft box you need to send a chr(10) too!
Private Sub txtSend_KeyPress(KeyAscii As Integer)
if keyascii <> 13 then
tcpClient.SendData Chr$(KeyAscii)
else
tcpClient.SendData vbcrlf
End Sub
-