hi,
is there a function that returns the keycode ?
thank you in advance
Printable View
hi,
is there a function that returns the keycode ?
thank you in advance
could you elaborate a little?
KeyDown and KeyUp events. For example (the KeyDown):Code:Private Sub txtText1_KeyDown(KeyCode As Integer, Shift As Integer)
Debug.Print KeyCode
End Sub
thank you .
I know it is used in the keydown event.. but i want to use it separately . KEYDOWN and KEYUP takes the character typed on the keyboard and gives its keycode I want a function or method that takes the character and returns the keycode ..
for example keypress takes the KEYASCII as a parameter , but also we can use the AscW(character) as a separate method
thanx
KEYDOWN and KEYUP don't take the character that was typed. KeyCode is an indication of the keyboard key that was pressed.
what do you expect your function to take as characters don't map to keycodes?
also, why do you want to do this?
Do you meanvb Code:
Dim iCode As Integer iCode = Asc(sChar)
Asc is a function, not a method.