-
I want to setup a program that recognizes when a certain key is pressed, then have it changed and sent to a text box. I have seen and example on this site but it only has the keycodes for the up, down, left, and right arrow keys. Is there a place I can go to see the keycodes for all the keys? Thanx in advance
-
Hi.
Sorry, I can't quite understand what you mean.
Do you want the KeyCodes for all keys? That can be found if you go to MSDN or your Help files and search for "KeyCode Constants".
But what is it that you want to have changed? And what appears in the text box?
-
Keyboard Keycodes
ok here is what I need. I want it so if you have two text boxes, if they were to put say the letter 'B' you push a button and in the second text box would say '123' ..something like that. Im not quite sure how to set it up though I new to all this. Something like
If keycode #
then textbox '123'
else textbox ' '
I know thats not code but its the general idea.
Or even better have it so a command button isnt even needed and it changes AS its being typed. type a letter get instant change in bottom box...i guess it would look like its typing as you are. sorry if thats complicated. Thanx again
-
I still don't quite follow you, but try this
Make a form with two text boxes (Text1 and Text2) .
Erase their initial Text.
then in Code:
Private Sub Text1_Change()
strKey = Mid(Text1.Text, Len(Text1.Text), 1)
If strKey = "B" Then
Text2.Text = "You Typed B"
Else
Text2.Text = ""
End If
End Sub
I hope this is similar to what you wanted.
-
Keys
that was what I was looking for, it works great thanx! :D