Hi, I've got a way of using keyboard input to what I want, But, it's very long. I'll post a snippet of what I've got, and I'd like to if anyone has a better way of doing it.
To me, that seems like a long way of going about it, but whenever I tried:Code:public sub frm_KeyPress(KeyAscii as integer) If KeyAscii = 97 Then frm1.msg_input.Caption = frm1.msg_input.Caption + "a" ElseIf KeyAscii = 98 Then frm1.msg_input.Caption = frm1.msg_input.Caption + "b" ElseIf KeyAscii = 99 Then frm1.msg_input.Caption = frm1.msg_input.Caption + "c" ElseIf KeyAscii = 100 Then frm1.msg_input.Caption = frm1.msg_input.Caption + "d" ElseIf KeyAscii = 101 Then frm1.msg_input.Caption = frm1.msg_input.Caption + "e" ElseIf KeyAscii = 102 Then frm1.msg_input.Caption = frm1.msg_input.Caption + "f" ElseIf KeyAscii = 103 Then frm1.msg_input.Caption = frm1.msg_input.Caption + "g" ElseIf KeyAscii = 104 Then frm1.msg_input.Caption = frm1.msg_input.Caption + "h" ElseIf KeyAscii = 105 Then frm1.msg_input.Caption = frm1.msg_input.Caption + "i" ElseIf KeyAscii = 106 Then frm1.msg_input.Caption = frm1.msg_input.Caption + "j" End If end sub
I got an error for putting an integer in the string. Any ideas?Code:frm1.msg_input.Caption = frm1.msg_input.Caption + KeyAscii
Syrillia




Reply With Quote