Key Code Constants for Visual Basic 6.0 Users
The following tables show the Visual Basic 6.0 Key Code constants and values and their Visual Basic 2008 equivalents.
Key Code Constants
Visual Basic 6.0 |
Visual Basic 2008 Equivalent |
---|---|
vbKeyLButton (1) |
|
vbKeyRButton (2) |
|
vbKeyCancel (3) |
|
vbKeyMButton (4) |
|
vbKeyBack (8) |
|
vbKeyTab (9) |
|
vbKeyClear (12) |
|
vbKeyReturn (13) |
|
vbKeyShift (16) |
|
vbKeyControl (17) |
|
vbKeyMenu (18) |
|
vbKeyPause (19) |
|
vbKeyCapital (20) |
|
vbKeyEscape (27) |
|
vbKeySpace (32) |
|
vbKeyPageUp (33) |
|
vbKeyPageDown (34) |
|
vbKeyEnd (35) |
|
vbKeyHome (36) |
|
vbKeyLeft (37) |
|
vbKeyUp (38) |
|
vbKeyRight (39) |
|
vbKeyDown (40) |
|
vbKeySelect (41) |
|
vbKeyPrint (42) |
|
vbKeyExecute (43) |
|
vbKeySnapshot (44) |
|
vbKeyInsert (45) |
|
vbKeyDelete (46) |
|
vbKeyHelp (47) |
|
vbKeyNumlock (144) |
|
vbKeyScrollLock (145) |
Alphabetic Key Code Constants
Visual Basic 6.0 |
Visual Basic 2008 Equivalent |
---|---|
VbKeyA (65) |
|
VbKeyB (66) |
|
VbKeyC (67) |
|
VbKeyD (68) |
|
VbKeyE (69) |
|
VbKeyF (70) |
|
VbKeyG (71) |
|
VbKeyH (72) |
|
VbKeyI (73) |
|
VbKeyJ (74) |
|
VbKeyK (75) |
|
VbKeyL( 76) |
|
vbKeyM (77) |
|
VbKeyN (78) |
|
VbKeyO (79) |
|
VbKeyP( 80) |
|
VbKeyQ (81) |
|
VbKeyR (82) |
|
VbKeyS (83) |
|
VbKeyT (84) |
|
VbKeyU (85) |
|
VbKeyV (86) |
|
VbKeyW (87) |
|
VbKeyX (88) |
|
VbKeyY (89) |
|
VbKeyZ (90) |
Numeric Key Constants
Visual Basic 6.0 |
Visual Basic 2008 Equivalent |
---|---|
vbKey0 (48) |
|
vbKey1 (49) |
|
vbKey2 (50) |
|
vbKey3 (51) |
|
vbKey4 (52) |
|
vbKey5 (53) |
|
vbKey6 (54) |
|
vbKey7 (55) |
|
vbKey8 (56) |
|
vbKey9 (57) |
Numeric Keypad Key Constants
Visual Basic 6.0 |
Visual Basic 2008 Equivalent |
---|---|
vbKeyNumpad0 (96) |
|
vbKeyNumpad1 (97) |
|
vbKeyNumpad2 (98) |
|
vbKeyNumpad3 (99) |
|
vbKeyNumpad4 (100) |
|
vbKeyNumpad5 (101) |
|
vbKeyNumpad6 (102) |
|
vbKeyNumpad7 (103) |
|
vbKeyNumpad8 (104) |
|
vbKeyNumpad9 (105) |
|
VbKeyMultiply (106) |
|
VbKeyAdd (107) |
|
VbKeySeparator (108) |
|
VbKeySubtract (109) |
|
VbKeyDecimal (110) |
|
VbKeyDivide (111) |
Function Key Constants
Visual Basic 6.0 |
Visual Basic 2008 Equivalent |
---|---|
vbKeyF1 (112) |
|
vbKeyF2 (113) |
|
vbKeyF3 (114) |
|
vbKeyF4 (115) |
|
vbKeyF5 (116) |
|
vbKeyF6 (117) |
|
vbKeyF7 (118) |
|
vbKeyF8 (119) |
|
vbKeyF9 (120) |
|
vbKeyF10 (121) |
|
vbKeyF11 (122) |
|
vbKeyF12 (123) |
|
vbKeyF13 (124) |
|
vbKeyF14 (125) |
|
vbKeyF15 (126) |
|
vbKeyF16 (127) |