Click to See Complete Forum and Search --> : How to get then scan code value of key ?


February 19th, 2000, 08:23 AM
Hi all !

I want to know if its possible to get the scan code value when a key is press on the keyboard in visual basic. The KeyDown or KeyPress message doesn't provide the information is there another way ? I know the OnKeyDown Message in win32 using VC++ provide such information but where can i find it in VB ??

Thanx
Charles

Spectre
February 20th, 2000, 12:19 AM
The first parameter (KeyCode) of the KeyDown and KeyUp events is the scan code of the key that was pressed (not to be confused with the ASCII value of the key returned by the KeyPress event). The second parameter "shift" is used to determine the state of the shift key when the KeyUp or KeyDown event fired.