VB键盘常量大全 256个虚拟键码
VB 中所有键盘上的键值代码
vbKeyF5 116 F5 键
vbKeyF6 117 F6 键
vbKeyF7 118 F7 键
vbKeyF8 119 F8 键
vbKeyF9 120 F9 键
vbKeyF111 键
vbKeyF12 123 F12 键
vbKeyInser 45 INS 键
vbKeyDelete 46 DEL 键
vbKeyHelp 47 HELP 键
vbKeyNumlock 144 NUM LOCK 键
================================
A 键到 Z 键与其 ASCII 码的相应值'A' 到 'Z' 是一致的
vbKeyReturn 13 ENTER 键
vbKeyShift 16 SHIFT 键
vbKeyControl 17 CTRL 键
vbKeyMenu 18 菜单键
vbKeyPause 19 PAUSE 键
vbKeyCapital 20 CAPS LOCK 键
vbKeyEscape 27 ESC 键
vbKeyDecimal 110 小数点 (.) 键
vbKeyDivide 111 除号 (/) 键
==================================================
功能键
常数 值 描述
vbKeyF1 112 F1 键
vbKeyF2 113 F2 键
vbKeyF3 114 F3 键
vbKey1 49 1 键
vbKey2 50 2 键
vbKey3 51 3 键
常用ASCII码/KeyCode/vbkey值列表
vbKeyO 79 O 键
vbKeyP 80 P 键
vbKeyQ 81 Q 键
vbKeyR 82 R 键
vbKeyS 83 S 键
vbKeyT 84 T 键
vbKeyU 85 U 键
vbKeyV 86 V 键
vbKeyW 87 W 键
VB KeyCode 常数表
常数
值 描述
vbKeyLButton 0x1 鼠标左键
vbKeyRButton 0x2 鼠标右键
vbKeyCancel 0x3 CANCEL 键
vbKeyMButton 0x4 鼠标中键
vbKeyBack 0x8 BACKSPACE 键
vbKeyTab 0x9 TAB 键
vbKeyEscape 0x1B ESC 键
vbKeySpace 0x20 SPACEBAR 键
vbKeyPageUp 0x21 PAGE UP 键
vbKeyEnd 0x23 END 键
vbKeyHome 0x24 HOME 键
vbKeyLeft 0x25 LEFT ARROW 键
ASCII码对照表
ASCII, American Standard Code for Information Interchange 念起來像是 "阿斯key",定義從 0 到 127 的一百二十八個數字所代表的英文字母或數字或符號,所有使用 ASCII 的電腦之間可以互相讀取同一份文件而不會有不一樣的結果與意義。由於只使用 7 個位元 (bit) 就可以表示從 0 到 127 的數字,大部分的電腦都使用 8 個位元來存取字元集 (character set),所以從 128 到 255 之間的數字可以用來代表另一組一百二十八個符號,稱為 extended ASCII。
键盘键与虚拟键码对照表
键盘键与虚拟键码对照表键盘键与虚拟键码对照表字母和数字键数字小键盘的键功能键其它键键键码键键码键键码键键码A650 96 F1 112 Backspace 8B661 97 F2 113Tab 9C67 2 98 F3 114Clear 12D683 99 F4 115Enter 13E69 4 100F5 116Shift16F70 5 101F6 117Control 17G71 6 102F7 118 Alt 18H72 7 103F8 119 Caps Lock 20I73 8 104F9 120Esc 27J74 9 105F10121Spacebar32K75 * 106F11122 Page Up33L76 + 107F12123 Page Down 34 M77 Enter 108-- --End 35 N78 - 109-- -- Home36 O79 . 110-- -- Left Arrow37 P80 / 111-- -- Up Arrow38Q81 -- ---- -- Right Arrow 39 R82 -- ---- -- Down Arrow 40 S83 -- ---- -- Insert 45 T84 -- ---- -- Delete 46 U85 -- ---- -- Help 47 V86 -- ---- -- Num Lock 144 W87X88Y89Z900481492503514525536547558569570x1 鼠标左键0x2 鼠标右键0x3 CANCEL 键0x4 鼠标中键0x8 BACKSPACE 键0x9 TAB 键0xC CLEAR 键0xD ENTER 键0x10 SHIFT 键0x11 CTRL 键0x12 MENU 键0x13 PAUSE 键0x14 CAPS LOCK 键0x1B ESC 键0x20 SPACEBAR 键0x21 PAGE UP 键0x22 PAGE DOWN 键0x23 END 键0x24 HOME 键0x25 LEFT ARROW 键0x26 UP ARROW 键0x27 RIGHT ARROW 键0x28 DOWN ARROW 键0x29 Select 键0x2A PRINT SCREEN 键0x2B EXECUTE 键0x2C SNAPSHOT 键0x2D Insert 键0x2E Delete 键0x2F HELP 键0x90 NUM LOCK 键A 至 Z 键与 A – Z 字母的 ASCII 码相同:值描述65 A 键66 B 键67 C 键68 D 键69 E 键70 F 键71 G 键72 H 键73 I 键74 J 键75 K 键76 L 键77 M 键78 N 键79 O 键80 P 键81 Q 键82 R 键83 S 键84 T 键85 U 键86 V 键87 W 键88 X 键89 Y 键90 Z 键0 至 9 键与数字 0 – 9 的 ASCII 码相同:48 0 键49 1 键50 2 键51 3 键52 4 键53 5 键54 6 键55 7 键56 8 键57 9 键下列常数代表数字键盘上的键:值描述0x60 0 键0x61 1 键0x62 2 键0x63 3 键0x64 4 键0x65 5 键0x66 6 键0x67 7 键0x68 8 键0x69 9 键0x6A MULTIPLICATION SIGN (*) 键0x6B PLUS SIGN (+) 键0x6C ENTER 键0x6D MINUS SIGN (–) 键0x6E DECIMAL POINT (.) 键0x6F DIVISION SIGN (/) 键下列常数代表功能键:0x70 F1 键0x71 F2 键0x72 F3 键0x73 F4 键0x74 F5 键0x75 F6 键0x76 F7 键0x77 F8 键0x78 F9 键0x79 F10 键0x7A F11 键0x7B F12 键0x7C F13 键0x7D F14 键0x7E F15 键0x7F F16 键0 None3 Cancel(Break)8 Back9 Tab13 Return16 ShiftKey17 ControlKey18 Menu19 Pause20 Capital(大小写) 27 Escape32 Space33 PageUp34 Next(PageDonw)35 End36 Home37 Left38 Up39 Right40 Down0-9 48-5745 Insert46 Delete65->90 A->Z91 LWin93 Apps96 105 NumPad0- 106 Multiply * 107 Add+ 108109 Subtract-110 Decimal .111 Divide /112-123 F1-F12144 NumLock145 Scroll173 VolumeMute174 VolumeDown175 VolumeUp186 Oem1 ;187 Oemplus =188 Oemcomma ,189 OemMinus -190 OemPeriod .191 OemQuestion /192 Oemtilde `219 OemOpenBrackets [ 220 Oem5 \221 Oem6 ] 222 Oem7 '。
键盘键值表
下列常数代表功能键: vbKeyF1 vbKeyF2 vbKeyF3 vbKeyF4 vbKeyF5 vbKeyF6 vbKeyF7 vbKeyF8 vbKeyF9 vbKeyF10 vbKeyF11 vbKeyF12 vbKeyF13 vbKeyF14 vbKeyF15 0x70 0x71 0x72 0x73 0x74 0x75 0x76 0x77 0x78 0x79 0x7A 0x7B 0x7C 0x7D 0x7E F1 键 F2 键 F3 键 F4 键 F5 键 F6 键 F7 键 F8 键 F9 键 F10 键 F11 键 F12 键 F13 键 F14 键 F15 键
vbKeyF16
0x7F
F16 键
0x62 0x63 0x64 0x65 0x66 0x67 0x68 0x69 0x6A 0x6B 0x6C 0x6D 0x6E 0x6F
2键 3键 4键 5键 6键 7键 8键 9键 MULTIPLICATION SIGN (*) 键 PLUS SIGN (+) 键 ENTER 键 MINUS SIGN (–) 键 DECIMAL POINT (.) 键 DIVISION SIGN (/) 键
0 至 9 键与数字 0 – 9 的 ASCII 码相同: vbKeyNumpad0 vbKeyNumpad1 0x60 0x61 0键 1键
vbKeyNumpad2 vbKeyNumpad3 vbKeyNumpad4 vbKeyNumpad5 vbKeyNumpad6 vbKeyNumpad7 vbKeyNumpad8 vbKeyNumpad9 vbKeyMultiply vbKeyAdd vbKeySeparator vbKeySubtract vbKeyDecimal vbKeyDivide
VB键盘常量大全256个虚拟键码
Public Const VK_LBUTTON = &H1 Public Const VK_RBUTTON = &H2 Public Const VK_CANCEL = &H3 Public Const VK_MBUTTON = &H4 Public Const VK_BACK = &H8 Public Const VK_TAB = &H9 Public Const VK_CLEAR = &HC Public Const VK_RETURN = &HD Public Const VK_SHIFT = &H10 Public Const VK_CONTROL = &H11 Public ConstVK_MENU = &H12 Public ConstVK_PAUSE = &H13 Public ConstVK_CAPITAL = &H14 Public ConstVK_ESCAPE = &H1B Public ConstVK_SPACE = &H20 Public ConstVK_PRIOR = &H21 Public ConstVK_NEXT = &H22 Public Const VK_END = &H23 Public Const VK_HOME = &H24 Public Const VK_LEFT = &H25 Public Const VK_UP = &H26 Public ConstVK_RIGHT = &H27 Public ConstVK_DOWN = &H28 Public ConstVK_Select = &H29 Public ConstVK_PRINT = &H2A Public ConstVK_EXECUTE = &H2B Public ConstVK_SNAPSHOT = &H2C Public ConstVK_Insert = &H2D Public ConstVK_Delete = &H2E Public ConstVK_HELP = &H2F Public Const VK_0 = &H30 Public Const VK_1 = &H31 Public Const VK_2 = &H32 Public Const VK_3 = &H33 Public Const VK_4 = &H34 Public Const VK_5 = &H35 Public Const VK_6 = &H36 Public Const VK_7 = &H37 Public Const VK_8 = &H38 Public Const VK_9 = &H39 Public Const VK_A = &H41 Public Const VK_B = &H42 Public Const VK_C = &H43Public Const VK_D = &H44Public Const VK_E = &H45 Public Const VK_F = &H46 Public Const VK_G = &H47 Public Const VK_H = &H48 Public Const VK_I = &H49 Public Const VK_J = &H4A Public Const VK_K= &H4B Public Const VK_L = &H4C Public Const VK_M = &H4D Public Const VK_N = &H4E Public Const VK_O = &H4F Public Const VK_P = &H50 Public Const VK_Q = &H51 Public Const VK_R = &H52 Public Const VK_S = &H53 Public Const VK_T = &H54 Public Const VK_U = &H55 Public Const VK_V = &H56 Public Const VK_W = &H57 Public Const VK_X = &H58 Public Const VK_Y = &H59 Public Const VK_Z = &H5A Public Const VK_STARTKEY = &H5B Public Const VK_CONTEXTKEY = &H5D Public Const VK_NUMPAD0 = &H60 Public Const VK_NUMPAD1 = &H61 Public Const VK_NUMPAD2 = &H62 Public Const VK_NUMPAD3 = &H63 Public Const VK_NUMPAD4 = &H64 Public Const VK_NUMPAD5 = &H65 Public Const VK_NUMPAD6 = &H66 Public Const VK_NUMPAD7 = &H67 Public Const VK_NUMPAD8 = &H68 Public Const VK_NUMPAD9 = &H69 Public Const VK_MULTIPLY = &H6A Public Const VK_ADD = &H6BPublic Const VK_SEPARATOR = &H6C Public Const VK_SUBTRACT = &H6D Public Const VK_DECIMAL = &H6E Public Const VK_DIVIDE = &H6F Public Const VK_F1 = &H70 Public Const VK_F2 = &H71 Public ConstVK_F3 = &H72Public Const VK_F4 = &H73Public Const VK_F5 = &H74 Public Const VK_F6 = &H75 Public Const VK_F7 = &H76 Public Const VK_F8 = &H77 Public Const VK_F9 = &H78 Public Const VK_F10 = &H79 Public Const VK_F11 = &H7A Public Const VK_F12 = &H7B Public Const VK_F13 = &H7C Public Const VK_F14 = &H7D Public Const VK_F15 = &H7E Public Const VK_F16 = &H7F Public Const VK_F17 = &H80 Public Const VK_F18 = &H81 Public Const VK_F19 = &H82 Public Const VK_F20 = &H83 Public Const VK_F21 = &H84 Public Const VK_F22 = &H85 Public Const VK_F23 = &H86 Public Const VK_F24 = &H87 Public Const VK_NUMLOCK = &H90 Public Const VK_OEM_SCROLL = &H91 Public Const VK_OEM_1 = &HBAPublic Const VK_OEM_PLUS = &HBB Public Const VK_OEM_COMMA = &HBC Public Const VK_OEM_MINUS = &HBD Public Const VK_OEM_PERIOD = &HBE Public Const VK_OEM_2 = &HBF Public Const VK_OEM_3 = &HC0 Public Const VK_OEM_4 = &HDB Public Const VK_OEM_5 = &HDC Public Const VK_OEM_6 = &HDD Public Const VK_OEM_7 = &HDE Public Const VK_OEM_8 = &HDF Public Const VK_ICO_F17 = &HE0 Public Const VK_ICO_F18 = &HE1 Public Const VK_OEM102 = &HE2 Public Const VK_ICO_HELP = &HE3 Public Const VK_ICO_00 = &HE4 Public Const VK_ICO_CLEAR = &HE6 Public Const VK_OEM_RESET = &HE9 Public Const VK_OEM_JUMP = &HEA Public Const VK_OEM_PA1 = &HEB Public Const VK_OEM_PA2 = &HECPublic Const VK_OEM_PA3 = &HED Public Const VK_OEM_WSCTRL = &HEE Public ConstVK_OEM_CUSEL = &HEFPublic Const VK_OEM_A TTN = &HF0Public Const VK_OEM_FINNISH = &HF1Public Const VK_OEM_COPY = &HF2Public Const VK_OEM_AUTO = &HF3Public Const VK_OEM_ENLW = &HF4Public Const VK_OEM_BACKTAB = &HF5Public Const VK_ATTN = &HF6Public Const VK_CRSEL = &HF7Public Const VK_EXSEL = &HF8Public Const VK_EREOF = &HF9Public Const VK_PLAY = &HFAPublic Const VK_ZOOM = &HFBPublic Const VK_NONAME = &HFCPublic Const VK_PA1 = &HFDPublic Const VK_OEM_CLEAR = &HFE虚拟键码虚拟键码保存在WM_KEYDOWN 、WM_KEYUP 、WM_SYSKEYDOWN 和WM_SYSKEYUP 讯息的wParam 参数中。
KeyCode常量(虚拟键码)
KeyCode 常量
值
十进制
(16进制) (vba返回值)
0x1
1
0x2
2
0x3
3
0x4
4
0x8
8
0x9
9
0xC
12
0xD
13
0x10
16
0x11
17
0x12
18
0x13
19
0x14
20
0x1B
27
0x20
32
0x21
33
0x22
34
0x23
35
0x24
36
0x25
37
0x26
38
0x27
39
0x28
A-Z键
0-9键
0键 1键 2键 3键 4键 5键 6键
vbKeyNumpad7
0x67
103
vbKeyNumpad8
0x68
104
vbKeyNumpad9
0x69
105
vbKeyMultiply
0x6A
106
vbKeyAdd
0x6B
107
vbKeySeparator
0x6C
108
vbKeySubtract
A-z 键:A 键 到 Z 键与–z 的 ASCII 等效
vbKeyA-Z
0键-9 键:0键 到9键与它们的 ASCII 等价
vbKey0-9 数字键盘键 vbKeyNumpad0 vbKeyNumpad1 vbKeyNumpad2 vbKeyNumpad3 vbKeyNumpad4 vbKeyNumpad5 vbKeyNumpad6
ASCII键码VB中的键码常数
ASCII键码VB中的键码常数ASCII键码VB中的键码常数键码值描述-------------------------------------------------------------------vbKeyLButton 1 鼠标左键-------------------------------------------------------------------vbKeyRButton 2 鼠标右键-------------------------------------------------------------------vbKeyCancel 3 CANCEL 键-------------------------------------------------------------------vbKeyMButton 4 鼠标中键-------------------------------------------------------------------vbKeyBack 8 Backspace 键-------------------------------------------------------------------vbKeyTab 9 TAB 键-------------------------------------------------------------------vbKeyClear 12 CLEAR 键-------------------------------------------------------------------vbKeyReturn 13 Enter 键-------------------------------------------------------------------vbKeyShift 16 Shift 键-------------------------------------------------------------------vbKeyConterol 17 Ctrl 键-------------------------------------------------------------------vbKeyMenu 18 菜单键-------------------------------------------------------------------vbKeyPause 19 PAUSE 键-------------------------------------------------------------------vbKeyCapital 20 CAPS LOCK 键-------------------------------------------------------------------vbKeyEscape 27 ESC 键-------------------------------------------------------------------vbKeySpace 32 SPACEBAR 键-------------------------------------------------------------------vbKeyPageUp 33 PAGEUP 键------------------------------------------------------------------- vbKeyPageDown 34 PAGEDOWN 键-------------------------------------------------------------------vbKeyEnd 35 END 键-------------------------------------------------------------------vbKeyHome 36 HOME 键------------------------------------------------------------------vbKeyLeft 37 LEFT ARROW 键←-------------------------------------------------------------------vbKeyUp 38 UP ARROW 键↑-------------------------------------------------------------------vbKeyRight 39 RIGHT ARROW 键→-------------------------------------------------------------------vbKeyDown 40 DOWN ARROW 键↓-------------------------------------------------------------------vbKeySelect 41 SELECT 键-------------------------------------------------------------------vbKeyPrint 42 PRINT SCREEN 键-------------------------------------------------------------------vbKeyExecute 43 EXECUTE 键-------------------------------------------------------------------vbKeySnapshot 44 SNAP SHOT 键-------------------------------------------------------------------vbKeyInser 45 INSERT 键-------------------------------------------------------------------vbKeyDelete 46 DELETE 键-------------------------------------------------------------------vbKeyHelp 47 HELP 键------------------------------------------------------------------vbKey0 48 0 键-------------------------------------------------------------------vbKey1 49 1 键-------------------------------------------------------------------vbKey2 50 2 键-------------------------------------------------------------------vbKey3 51 3 键-------------------------------------------------------------------vbKey4 52 4 键-------------------------------------------------------------------vbKey5 53 5 键-------------------------------------------------------------------vbKey6 54 6 键-------------------------------------------------------------------vbKey7 55 7 键-------------------------------------------------------------------vbKey8 56 8 键-------------------------------------------------------------------vbKey9 57 9 键------------------------------------------------------------------vbKeyA 65 A 键-------------------------------------------------------------------vbKeyB 66 B 键-------------------------------------------------------------------------------------------------------------------------------------- vbKeyD 68 D 键------------------------------------------------------------------- vbKeyE 69 E 键------------------------------------------------------------------- vbKeyF 70 F 键------------------------------------------------------------------- vbKeyG 71 G 键------------------------------------------------------------------- vbKeyH 72 H 键------------------------------------------------------------------- vbKeyI 73 I 键------------------------------------------------------------------- vbKeyJ 74 J 键------------------------------------------------------------------- vbKeyK 75 K 键------------------------------------------------------------------- vbKeyL 76 L 键------------------------------------------------------------------- vbKeyM 77 M 键------------------------------------------------------------------- vbKeyN 78 N 键------------------------------------------------------------------- vbKeyO 79 O 键------------------------------------------------------------------- vbKeyP 80 P 键------------------------------------------------------------------- vbKeyQ 81 Q 键------------------------------------------------------------------- vbKeyR 82 R 键------------------------------------------------------------------- vbKeyS 83 S 键------------------------------------------------------------------- vbKeyT 84 T 键------------------------------------------------------------------- vbKeyU 85 U 键------------------------------------------------------------------- vbKeyV 86 V 键------------------------------------------------------------------- vbKeyW 87 W 键------------------------------------------------------------------- vbKeyX 88 X 键--------------------------------------------------------------------------------------------------------------------------------------vbKeyZ 90 Z 键-------------------------------------------------------------------vbKeyNum0 96 0 键(在数字小键盘上) -------------------------------------------------------------------vbKeyNum1 97 1 键(在数字小键盘上) -------------------------------------------------------------------vbKeyNum2 98 2 键(在数字小键盘上) -------------------------------------------------------------------vbKeyNum3 99 3 键(在数字小键盘上) -------------------------------------------------------------------vbKeyNum4 100 4 键(在数字小键盘上) -------------------------------------------------------------------vbKeyNum5 101 5 键(在数字小键盘上) -------------------------------------------------------------------vbKeyNum6 102 6 键(在数字小键盘上) -------------------------------------------------------------------vbKeyNum7 103 7 键(在数字小键盘上) -------------------------------------------------------------------vbKeyNum8 104 8 键(在数字小键盘上) -------------------------------------------------------------------vbKeyNum9 105 9 键(在数字小键盘上) -------------------------------------------------------------------vbKeyMultiply 106 乘号(*) 键-------------------------------------------------------------------vbKeyAdd 107 加号(+) 键-------------------------------------------------------------------vbKeySeparator 108 Enter键(在数字小键盘上) -------------------------------------------------------------------vbKeySubtract 109 减号(-) 键-------------------------------------------------------------------vbKeyDecimal 110 小数点(.) 键-------------------------------------------------------------------vbKeyDivide 111 除号(/) 键-------------------------------------------------------------------vbKeyF1 112 F1 键-------------------------------------------------------------------vbKeyF2 113 F2 键-------------------------------------------------------------------vbKeyF3 114 F3 键-------------------------------------------------------------------vbKeyF4 115 F4 键--------------------------------------------------------------------------------------------------------------------------------------vbKeyF6 117 F6 键-------------------------------------------------------------------vbKeyF7 118 F7 键-------------------------------------------------------------------vbKeyF8 119 F8 键-------------------------------------------------------------------vbKeyF9 120 F9 键-------------------------------------------------------------------vbKeyF10 121 F10 键-------------------------------------------------------------------vbKeyF11 122 F11 键-------------------------------------------------------------------vbKeyF12 123 F12 键-------------------------------------------------------------------vbKeyF13 124 F13 键-------------------------------------------------------------------vbKeyF14 125 F14 键-------------------------------------------------------------------vbKeyF15 126 F15 键-------------------------------------------------------------------vbKeyF16 127 F16 键------------------------------------------------------------------- vbKeyNumlock 144 NUM LOCK 键-------------------------------------------------------------------。
VB键盘常量大全256个虚拟键码
Public Const VK_LBUTTON = &H1 Public Const VK_RBUTTON = &H2 Public Const VK_CANCEL = &H3 Public Const VK_MBUTTON = &H4 Public Const VK_BACK = &H8 Public Const VK_TAB = &H9Public Const VK_CLEAR = &HC Public Const VK_RETURN = &HD Public Const VK_SHIFT = &H10 Public Const VK_CONTROL = &H11 Public Const VK_MENU = &H12 Public Const VK_PAUSE = &H13 Public Const VK_CAPITAL = &H14 Public Const VK_ESCAPE = &H1B Public Const VK_SPACE = &H20 Public Const VK_PRIOR = &H21 Public Const VK_NEXT = &H22 Public Const VK_END = &H23 Public Const VK_HOME = &H24 Public Const VK_LEFT = &H25 Public Const VK_UP = &H26Public Const VK_RIGHT = &H27 Public Const VK_DOWN = &H28 Public Const VK_Select = &H29 Public Const VK_PRINT = &H2A Public Const VK_EXECUTE = &H2B Public Const VK_SNAPSHOT = &H2C Public Const VK_Insert = &H2D Public Const VK_Delete = &H2E Public Const VK_HELP = &H2F Public Const VK_0 = &H30Public Const VK_1 = &H31Public Const VK_2 = &H32Public Const VK_3 = &H33Public Const VK_4 = &H34Public Const VK_5 = &H35Public Const VK_6 = &H36Public Const VK_7 = &H37Public Const VK_8 = &H38Public Const VK_9 = &H39Public Const VK_A = &H41Public Const VK_B = &H42Public Const VK_C = &H43Public Const VK_D = &H44Public Const VK_F = &H46Public Const VK_G = &H47Public Const VK_H = &H48Public Const VK_I = &H49Public Const VK_J = &H4APublic Const VK_K = &H4BPublic Const VK_L = &H4CPublic Const VK_M = &H4DPublic Const VK_N = &H4EPublic Const VK_O = &H4FPublic Const VK_P = &H50Public Const VK_Q = &H51Public Const VK_R = &H52Public Const VK_S = &H53Public Const VK_T = &H54Public Const VK_U = &H55Public Const VK_V = &H56Public Const VK_W = &H57Public Const VK_X = &H58Public Const VK_Y = &H59Public Const VK_Z = &H5APublic Const VK_STARTKEY = &H5B Public Const VK_CONTEXTKEY = &H5D Public Const VK_NUMPAD0 = &H60 Public Const VK_NUMPAD1 = &H61 Public Const VK_NUMPAD2 = &H62 Public Const VK_NUMPAD3 = &H63 Public Const VK_NUMPAD4 = &H64 Public Const VK_NUMPAD5 = &H65 Public Const VK_NUMPAD6 = &H66 Public Const VK_NUMPAD7 = &H67 Public Const VK_NUMPAD8 = &H68 Public Const VK_NUMPAD9 = &H69 Public Const VK_MULTIPLY = &H6A Public Const VK_ADD = &H6BPublic Const VK_SEPARATOR = &H6C Public Const VK_SUBTRACT = &H6D Public Const VK_DECIMAL = &H6E Public Const VK_DIVIDE = &H6FPublic Const VK_F1 = &H70Public Const VK_F2 = &H71Public Const VK_F3 = &H72Public Const VK_F4 = &H73Public Const VK_F6 = &H75Public Const VK_F7 = &H76Public Const VK_F8 = &H77Public Const VK_F9 = &H78Public Const VK_F10 = &H79Public Const VK_F11 = &H7APublic Const VK_F12 = &H7BPublic Const VK_F13 = &H7CPublic Const VK_F14 = &H7DPublic Const VK_F15 = &H7EPublic Const VK_F16 = &H7FPublic Const VK_F17 = &H80Public Const VK_F18 = &H81Public Const VK_F19 = &H82Public Const VK_F20 = &H83Public Const VK_F21 = &H84Public Const VK_F22 = &H85Public Const VK_F23 = &H86Public Const VK_F24 = &H87Public Const VK_NUMLOCK = &H90 Public Const VK_OEM_SCROLL = &H91 Public Const VK_OEM_1 = &HBA Public Const VK_OEM_PLUS = &HBB Public Const VK_OEM_COMMA = &HBC Public Const VK_OEM_MINUS = &HBD Public Const VK_OEM_PERIOD = &HBE Public Const VK_OEM_2 = &HBFPublic Const VK_OEM_3 = &HC0Public Const VK_OEM_4 = &HDB Public Const VK_OEM_5 = &HDC Public Const VK_OEM_6 = &HDD Public Const VK_OEM_7 = &HDE Public Const VK_OEM_8 = &HDFPublic Const VK_ICO_F17 = &HE0 Public Const VK_ICO_F18 = &HE1 Public Const VK_OEM102 = &HE2 Public Const VK_ICO_HELP = &HE3 Public Const VK_ICO_00 = &HE4Public Const VK_ICO_CLEAR = &HE6 Public Const VK_OEM_RESET = &HE9 Public Const VK_OEM_JUMP = &HEA Public Const VK_OEM_PA1 = &HEB Public Const VK_OEM_PA2 = &HEC。
VB中的按键码
vbKeyLButton 1 鼠标左键vbKeyRButton 2 鼠标右键vbKeyCancel 3 CANCEL 键vbKeyMButton 4 鼠标中键vbKeyBack 8 BACKSPACE 键vbKeyTab 9 TAB 键vbKeyClear 12 CLEAR 键vbKeyReturn 13 ENTER 键vbKeyShift 16 SHIFT 键vbKeyControl 17 CTRL 键vbKeyMenu 18 菜单键vbKeyPause 19 PAUSE 键vbKeyCapital 20 CAPS LOCK 键vbKeyEscape 27 ESC 键vbKeySpace 32 SPACEBAR 键vbKeyPageUp 33 PAGEUP 键vbKeyPageDown 34 PAGEDOWN 键vbKeyEnd 35 END 键vbKeyHome 36 HOME 键vbKeyLeft 37 LEFT ARROW 键vbKeyUp 38 UP ARROW 键vbKeyRight 39 RIGHT ARROW 键vbKeyDown 40 DOWN ARROW 键vbKeySelect 41 SELECT 键vbKeyPrint 42 PRINT SCREEN 键vbKeyExecute 43 EXECUTE 键vbKeySnapshot 44 SNAP SHOT 键vbKeyInser 45 INS 键vbKeyDelete 46 DEL 键vbKeyHelp 47 HELP 键vbKeyNumlock 144 NUM LOCK 键A 键到Z 键与其ASCII 码的相应值'A' 到'Z' 是一致的常数值描述vbKeyA 65 A 键vbKeyB 66 B 键vbKeyC 67 C 键vbKeyD 68 D 键vbKeyE 69 E 键vbKeyF 70 F 键vbKeyG 71 G 键vbKeyH 72 H 键vbKeyI 73 I 键vbKeyJ 74 J 键vbKeyK 75 K 键vbKeyL 76 L 键vbKeyM 77 M 键vbKeyN 78 N 键vbKeyO 79 O 键vbKeyP 80 P 键vbKeyQ 81 Q 键vbKeyR 82 R 键vbKeyS 83 S 键vbKeyT 84 T 键vbKeyU 85 U 键vbKeyV 86 V 键vbKeyW 87 W 键vbKeyX 88 X 键vbKeyY 89 Y 键vbKeyZ 90 Z 键0 键到9 键与其ASCII 码的相应值'0' 到'9' 是一致的常数值描述vbKey0 48 0 键vbKey1 49 1 键vbKey2 50 2 键vbKey3 51 3 键vbKey4 52 4 键vbKey5 53 5 键vbKey6 54 6 键vbKey7 55 7 键vbKey8 56 8 键vbKey9 57 9 键数字小键盘上的键常数值描述vbKeyNumpad0 96 0 键vbKeyNumpad1 97 1 键vbKeyNumpad2 98 2 键vbKeyNumpad3 99 3 键vbKeyNumpad4 100 4 键vbKeyNumpad5 101 5 键vbKeyNumpad6 102 6 键vbKeyNumpad7 103 7 键vbKeyNumpad8 104 8 键vbKeyNumpad9 105 9 键vbKeyMultiply 106 乘号(*) 键vbKeyAdd 107 加号(+) 键vbKeySeparator 108 ENTER 键(在数字小键盘上)vbKeySubtract 109 减号(-) 键vbKeyDecimal 110 小数点(.) 键vbKeyDivide 111 除号(/) 键功能键常数值描述vbKeyF1 112 F1 键vbKeyF2 113 F2 键vbKeyF3 114 F3 键vbKeyF4 115 F4 键vbKeyF5 116 F5 键vbKeyF6 117 F6 键vbKeyF7 118 F7 键vbKeyF8 119 F8 键vbKeyF9 120 F9 键vbKeyF10 121 F10 键vbKeyF11 122 F11 键vbKeyF12 123 F12 键vbKeyF13 124 F13 键vbKeyF14 125 F14 键vbKeyF15 126 F15 键vbKeyF16 127 F16 键。
VB的keycode和keyascii大全及应用
VB的keycode和keyascii大全及应用Vb的keycode和keyasciiVB KeyCode 常数表常数值描述常数值描述vbKeyLButton 0x1 鼠标左键vbKeyT 84 T 键vbKeyRButton 0x2 鼠标右键vbKeyU 85 U 键vbKeyCancel 0x3 CANCEL 键vbKeyV 86 V 键vbKeyMButton 0x4 鼠标中键vbKeyW 87 W 键vbKeyBack 0x8 BACKSPACE 键vbKeyX 88 X 键vbKeyTab 0x9 TAB 键vbKeyY 89 Y 键vbKeyClear 0xC CLEAR 键vbKeyZ 90 Z 键vbKeyReturn 0xD ENTER 键vbKeyShift 0x10 SHIFT 键vbKey0 48 0 键vbKeyControl 0x11 CTRL 键vbKey1 49 1 键vbKeyMenu 0x12 MENU 键vbKey2 50 2 键vbKeyPause 0x13 PAUSE 键vbKey3 51 3 键vbKeyCapital 0x14 CAPS LOCK 键vbKey4 52 4 键vbKeyEscape 0x1B ESC 键vbKey5 53 5 键vbKeySpace 0x20 SPACEBAR 键vbKey6 54 6 键vbKeyPageUp 0x21 PAGE UP 键vbKey7 55 7 键vbKeyEnd 0x23 END 键vbKey8 56 8 键vbKeyHome 0x24 HOME 键vbKey9 57 9 键vbKeyLeft 0x25 LEFT ARROW 键vbKeyUp 0x26 UP ARROW 键vbKeyRight 0x27 RIGHT ARROW 键vbKeyNumpad0 0x60 0 键vbKeyDown 0x28 DOWN ARROW 键vbKeyNumpad1 0x61 1 键vbKeySelect 0x29 SELECT 键vbKeyNumpad2 0x62 2 键vbKeyPrint 0x2A PRINT SCREEN 键vbKeyNumpad3 0x63 3 键vbKeyExecute 0x2B EXECUTE 键vbKeyNumpad4 0x64 4 键vbKeySnapshot 0x2C SNAPSHOT 键vbKeyNumpad5 0x65 5 键vbKeyDelete 0x2E DELETE 键vbKeyNumpad6 0x66 6 键vbKeyHelp 0x2F HELP 键vbKeyNumpad7 0x67 7 键vbKeyNumlock 0x90 NUM LOCK 键vbKeyNumpad8 0x68 8 键vbKeyNumpad9 0x69 9 键vbKeyA 65 A 键vbKeyMultiply 0x6A MULTIPLICATIONSIGN(*) vbKeyB 66 B 键vbKeyAdd 0x6B PLUS SIGN (+) 键vbKeyC 67 C 键vbKeySeparator 0x6C ENTER 键vbKeyD 68 D 键vbKeySubtract 0x6D MINUS SIGN (-) 键vbKeyE 69 E 键vbKeyDecimal 0x6E DECIMAL POINT (.) 键vbKeyF 70 F 键vbKeyDivide 0x6F DIVISION SIGN (/) 键vbKeyG 71 G 键vbKeyH 72 H 键vbKeyF1 0x70 F1 键vbKeyI 73 I 键vbKeyF2 0x71 F2 键vbKeyJ 74 J 键vbKeyF3 0x72 F3 键vbKeyK 75 K 键vbKeyF4 0x73 F4 键vbKeyL 76 L 键vbKeyF5 0x74 F5 键vbKeyM 77 M 键vbKeyF6 0x75 F6 键vbKeyN 78 N 键vbKeyF7 0x76 F7 键vbKeyO 79 O 键vbKeyF8 0x77 F8 键vbKeyP 80 P 键vbKeyF9 0x78 F9 键vbKeyQ 81 Q 键vbKeyF10 0x79 F10 键vbKeyR 82 R 键vbKeyF11 0x7A F11 键vbKeyS 83 S 键vbKeyF12 0x7B F12 键Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)Me.ClsPrint Chr$(KeyCode); KeyCodeEnd SubPrivate Sub Form_KeyDown(KeyAscii As Integer, Shift As Integer)Me.ClsPrint Chr$(KeyAscii); KeyAsciiEnd SubASCII码对照表ASCII, American Standard Code for Information Interchange 念起來像是"阿斯key",定義從0 到127 的一百二十八個數字所代表的英文字母或數字或符號,所有使用ASCII 的電腦之間可以互相讀取同一份文件而不會有不一樣的結果與意義。
VB键盘常量大全个虚拟键码
Public Const VK_LBUTTON = &H1 Public Const VK_RBUTTON = &H2 Public Const VK_CANCEL = &H3 Public Const VK_MBUTTON = &H4 Public Const VK_BACK = &H8 Public Const VK_TAB = &H9 Public Const VK_CLEAR = &HC Public Const VK_RETURN = &HD Public Const VK_SHIFT = &H10 Public Const VK_CONTROL = &H11 Public Const VK_MENU = &H12 Public Const VK_PAUSE = &H13 Public Const VK_CAPITAL = &H14 Public Const VK_ESCAPE = &H1B Public Const VK_SPACE = &H20 Public Const VK_PRIOR = &H21 Public Const VK_NEXT = &H22 Public Const VK_END = &H23 Public Const VK_HOME = &H24 Public Const VK_LEFT = &H25 Public Const VK_UP = &H26 Public Const VK_RIGHT = &H27 Public Const VK_DOWN = &H28 Public Const VK_Select = &H29 Public Const VK_PRINT = &H2A Public Const VK_EXECUTE = &H2BPublic Const VK_SNAPSHOT = &H2C Public Const VK_Insert = &H2D Public Const VK_Delete = &H2E Public Const VK_HELP = &H2F Public Const VK_0 = &H30Public Const VK_1 = &H31Public Const VK_2 = &H32Public Const VK_3 = &H33Public Const VK_4 = &H34Public Const VK_5 = &H35Public Const VK_6 = &H36Public Const VK_7 = &H37Public Const VK_8 = &H38Public Const VK_9 = &H39Public Const VK_A = &H41Public Const VK_B = &H42Public Const VK_C = &H43Public Const VK_D = &H44Public Const VK_E = &H45Public Const VK_F = &H46Public Const VK_G = &H47Public Const VK_H = &H48Public Const VK_I = &H49Public Const VK_J = &H4APublic Const VK_K = &H4BPublic Const VK_L = &H4CPublic Const VK_M = &H4DPublic Const VK_N = &H4EPublic Const VK_O = &H4FPublic Const VK_P = &H50Public Const VK_Q = &H51Public Const VK_R = &H52Public Const VK_S = &H53Public Const VK_T = &H54Public Const VK_U = &H55Public Const VK_V = &H56Public Const VK_W = &H57Public Const VK_X = &H58Public Const VK_Y = &H59Public Const VK_Z = &H5APublic Const VK_STARTKEY = &H5B Public Const VK_CONTEXTKEY = &H5D Public Const VK_NUMPAD0 = &H60 Public Const VK_NUMPAD1 = &H61 Public Const VK_NUMPAD2 = &H62 Public Const VK_NUMPAD3 = &H63 Public Const VK_NUMPAD4 = &H64 Public Const VK_NUMPAD5 = &H65 Public Const VK_NUMPAD6 = &H66 Public Const VK_NUMPAD7 = &H67 Public Const VK_NUMPAD8 = &H68 Public Const VK_NUMPAD9 = &H69Public Const VK_MULTIPLY = &H6A Public Const VK_ADD = &H6B Public Const VK_SEPARATOR = &H6C Public Const VK_SUBTRACT = &H6D Public Const VK_DECIMAL = &H6E Public Const VK_DIVIDE = &H6F Public Const VK_F1 = &H70Public Const VK_F2 = &H71Public Const VK_F3 = &H72Public Const VK_F4 = &H73Public Const VK_F5 = &H74Public Const VK_F6 = &H75Public Const VK_F7 = &H76Public Const VK_F8 = &H77Public Const VK_F9 = &H78Public Const VK_F10 = &H79 Public Const VK_F11 = &H7A Public Const VK_F12 = &H7B Public Const VK_F13 = &H7C Public Const VK_F14 = &H7D Public Const VK_F15 = &H7E Public Const VK_F16 = &H7F Public Const VK_F17 = &H80 Public Const VK_F18 = &H81 Public Const VK_F19 = &H82 Public Const VK_F20 = &H83Public Const VK_F21 = &H84Public Const VK_F22 = &H85Public Const VK_F23 = &H86Public Const VK_F24 = &H87Public Const VK_NUMLOCK = &H90 Public Const VK_OEM_SCROLL = &H91 Public Const VK_OEM_1 = &HBA Public Const VK_OEM_PLUS = &HBB Public Const VK_OEM_COMMA = &HBC Public Const VK_OEM_MINUS = &HBD Public Const VK_OEM_PERIOD = &HBE Public Const VK_OEM_2 = &HBF Public Const VK_OEM_3 = &HC0 Public Const VK_OEM_4 = &HDB Public Const VK_OEM_5 = &HDC Public Const VK_OEM_6 = &HDD Public Const VK_OEM_7 = &HDE Public Const VK_OEM_8 = &HDF Public Const VK_ICO_F17 = &HE0 Public Const VK_ICO_F18 = &HE1 Public Const VK_OEM102 = &HE2 Public Const VK_ICO_HELP = &HE3 Public Const VK_ICO_00 = &HE4 Public Const VK_ICO_CLEAR = &HE6 Public Const VK_OEM_RESET = &HE9 Public Const VK_OEM_JUMP = &HEAPublic Const VK_OEM_PA1 = &HEBPublic Const VK_OEM_PA2 = &HECPublic Const VK_OEM_PA3 = &HEDPublic Const VK_OEM_WSCTRL = &HEEPublic Const VK_OEM_CUSEL = &HEFPublic Const VK_OEM_ATTN = &HF0Public Const VK_OEM_FINNISH = &HF1Public Const VK_OEM_COPY = &HF2Public Const VK_OEM_AUTO = &HF3Public Const VK_OEM_ENLW = &HF4Public Const VK_OEM_BACKTAB = &HF5Public Const VK_ATTN = &HF6Public Const VK_CRSEL = &HF7Public Const VK_EXSEL = &HF8Public Const VK_EREOF = &HF9Public Const VK_PLAY = &HFAPublic Const VK_ZOOM = &HFBPublic Const VK_NONAME = &HFCPublic Const VK_PA1 = &HFDPublic Const VK_OEM_CLEAR = &HFE虚拟键码虚拟键码保存在WM_KEYDOWN、WM_KEYUP、WM_SYSKEYDOWN和WM_SYSKEYUP 讯息的wParam参数中。
VB键盘常用代码一览表
vbKeyC 67 字母 C 键
vbKeyD 68 字母 D 键
vbKeyE 69 字母 E 键
vbKeyF 70 字母 F 键
vbKeyG 71 字母 G 键
vbKeyH 72 字母 H 键
vbKeyI 73 字母 I 键
vbKeyJ 74 字母 J 键
vbKeyNumpad0 0x60 小键盘 0 键
vbKeyNumpad1 0x61 小键盘 1 键
vbKeyNumpad2 0x62 小键盘 2 键
vbKeyNumpad3 0x63 小键盘 3 键
vbKeyNumpad4 0x64 小键盘 4 键
vbKeyNumpad5 0x65 小键盘 5 键
vbKey2 50 数字 2 键
vbKey3 51 数字 3 键
vbKey4 52 数字 4 键
vbKey5 53 数字 5 键
vbKey6 54 数字 6 键
vbKey7 55 数字 7 键
vbKey8 56 数字 8 键
vbKey9 57 数字 9 键
vbKeyF1 0x70 F1 ቤተ መጻሕፍቲ ባይዱ能键
vbKeyEscape 0x1B ESC 键
vbKeySpace 0x20 空格键
vbKeyPageUp 0x21 Page Up 键
vbKeyPageDown 0x22 Page Down 键
vbKeyEnd 0x23 END 键
vbKeyHome 0x24 HOME 键
vbKeyLeft 0x25 光标左键
vbKeyNumpad6 0x66 小键盘 6 键
vbkey--键码
键码常数值描述vbKeyLButton 1 鼠标左键vbKeyRButton 2 鼠标右键vbKeyCancel 3 CANCEL 键vbKeyMButton 4 鼠标中键vbKeyBack 8 BACKSPACE 键vbKeyTab 9 TAB 键vbKeyClear 12 CLEAR 键vbKeyReturn 13 ENTER 键vbKeyShift 16 SHIFT 键vbKeyControl 17 CTRL 键vbKeyMenu 18 菜单键vbKeyPause 19 PAUSE 键vbKeyCapital 20 CAPS LOCK 键vbKeyEscape 27 ESC 键vbKeySpace 32 SPACEBAR 键vbKeyPageUp 33 PAGEUP 键vbKeyPageDown 34 PAGEDOWN 键vbKeyEnd 35 END 键vbKeyHome 36 HOME 键vbKeyLeft 37 LEFT ARROW 键vbKeyUp 38 UP ARROW 键vbKeyRight 39 RIGHT ARROW 键vbKeyDown 40 DOWN ARROW 键vbKeySelect 41 SELECT 键vbKeyPrint 42 PRINT SCREEN 键vbKeyExecute 43 EXECUTE 键vbKeySnapshot 44 SNAP SHOT 键vbKeyInser 45 INS 键vbKeyDelete 46 DEL 键vbKeyHelp 47 HELP 键vbKeyNumlock 144 NUM LOCK 键A 键到Z 键与其ASCII 码的相应值'A' 到'Z' 是一致的常数值描述vbKeyA 65 A 键vbKeyB 66 B 键vbKeyC 67 C 键vbKeyD 68 D 键vbKeyE 69 E 键vbKeyF 70 F 键vbKeyG 71 G 键vbKeyH 72 H 键vbKeyI 73 I 键vbKeyJ 74 J 键vbKeyK 75 K 键vbKeyL 76 L 键vbKeyM 77 M 键vbKeyN 78 N 键vbKeyO 79 O 键vbKeyP 80 P 键vbKeyQ 81 Q 键vbKeyR 82 R 键vbKeyS 83 S 键vbKeyT 84 T 键vbKeyU 85 U 键vbKeyV 86 V 键vbKeyW 87 W 键vbKeyX 88 X 键vbKeyY 89 Y 键vbKeyZ 90 Z 键0 键到9 键与其ASCII 码的相应值'0' 到'9' 是一致的常数值描述vbKey0 48 0 键vbKey1 49 1 键vbKey2 50 2 键vbKey3 51 3 键vbKey4 52 4 键vbKey5 53 5 键vbKey6 54 6 键vbKey7 55 7 键vbKey8 56 8 键vbKey9 57 9 键数字小键盘上的键常数值描述vbKeyNumpad0 96 0 键vbKeyNumpad1 97 1 键vbKeyNumpad2 98 2 键vbKeyNumpad3 99 3 键vbKeyNumpad4 100 4 键vbKeyNumpad5 101 5 键vbKeyNumpad6 102 6 键vbKeyNumpad7 103 7 键vbKeyNumpad8 104 8 键vbKeyNumpad9 105 9 键vbKeyMultiply 106 乘号(*) 键vbKeyAdd 107 加号(+) 键vbKeySeparator 108 ENTER 键(在数字小键盘上)vbKeySubtract 109 减号(-) 键vbKeyDecimal 110 小数点(.) 键vbKeyDivide 111 除号(/) 键功能键常数值描述vbKeyF1 112 F1 键vbKeyF2 113 F2 键vbKeyF3 114 F3 键vbKeyF4 115 F4 键vbKeyF5 116 F5 键vbKeyF6 117 F6 键vbKeyF7 118 F7 键vbKeyF8 119 F8 键vbKeyF9 120 F9 键vbKeyF10 121 F10 键vbKeyF11 122 F11 键vbKeyF12 123 F12 键vbKeyF13 124 F13 键vbKeyF14 125 F14 键vbKeyF15 126 F15 键vbKeyF16 127 F16 键回答者:hxf0663|六级| 2008-7-8 16:59vbKeyA 就是65回答者:Worsley_Barbar|六级| 2008-7-8 17:00这个是不需要转化的,例如vbKeyA之类是VB提供的内部常量.也就是说vbKeyA 和65是完全相等的,即使用vbKeyA代入到算式中起到的作用也是和65是一样的.是一个一位两面体.既然是一位两面体也就无所谓转化了.下面就是这些常量了.vbKeyLButton 1 鼠标左键vbKeyRButton 2 鼠标右键vbKeyCancel 3 CANCEL 键vbKeyMButton 4 鼠标中键vbKeyBack 8 BACKSPACE 键vbKeyTab 9 TAB 键vbKeyClear 12 CLEAR 键vbKeyReturn 13 ENTER 键vbKeyShift 16 SHIFT 键vbKeyControl 17 CTRL 键vbKeyMenu 18 菜单键vbKeyPause 19 PAUSE 键vbKeyCapital 20 CAPS LOCK 键vbKeyEscape 27 ESC 键vbKeySpace 32 SPACEBAR 键vbKeyPageUp 33 PAGEUP 键vbKeyPageDown 34 PAGEDOWN 键vbKeyEnd 35 END 键vbKeyHome 36 HOME 键vbKeyLeft 37 LEFT ARROW 键vbKeyUp 38 UP ARROW 键vbKeyRight 39 RIGHT ARROW 键vbKeyDown 40 DOWN ARROW 键vbKeySelect 41 SELECT 键vbKeyPrint 42 PRINT SCREEN 键vbKeyExecute 43 EXECUTE 键vbKeySnapshot 44 SNAP SHOT 键vbKeyInser 45 INS 键vbKeyDelete 46 DEL 键vbKeyHelp 47 HELP 键vbKeyNumlock 144 NUM LOCK 键A 键到Z 键与其ASCII 码的相应值'A' 到'Z' 是一致的常数值描述vbKeyA 65 A 键vbKeyB 66 B 键vbKeyC 67 C 键vbKeyD 68 D 键vbKeyE 69 E 键vbKeyF 70 F 键vbKeyG 71 G 键vbKeyH 72 H 键vbKeyI 73 I 键vbKeyJ 74 J 键vbKeyK 75 K 键vbKeyL 76 L 键vbKeyM 77 M 键vbKeyN 78 N 键vbKeyO 79 O 键vbKeyP 80 P 键vbKeyQ 81 Q 键vbKeyR 82 R 键vbKeyS 83 S 键vbKeyT 84 T 键vbKeyU 85 U 键vbKeyV 86 V 键vbKeyW 87 W 键vbKeyX 88 X 键vbKeyY 89 Y 键vbKeyZ 90 Z 键0 键到9 键与其ASCII 码的相应值'0' 到'9' 是一致的常数值描述vbKey0 48 0 键vbKey1 49 1 键vbKey2 50 2 键vbKey3 51 3 键vbKey4 52 4 键vbKey5 53 5 键vbKey6 54 6 键vbKey7 55 7 键vbKey8 56 8 键vbKey9 57 9 键数字小键盘上的键常数值描述vbKeyNumpad0 96 0 键vbKeyNumpad1 97 1 键vbKeyNumpad2 98 2 键vbKeyNumpad3 99 3 键vbKeyNumpad4 100 4 键vbKeyNumpad5 101 5 键vbKeyNumpad6 102 6 键vbKeyNumpad7 103 7 键vbKeyNumpad8 104 8 键vbKeyNumpad9 105 9 键vbKeyMultiply 106 乘号(*) 键vbKeyAdd 107 加号(+) 键vbKeySeparator 108 ENTER 键(在数字小键盘上)vbKeySubtract 109 减号(-) 键vbKeyDecimal 110 小数点(.) 键vbKeyDivide 111 除号(/) 键功能键常数值描述vbKeyF1 112 F1 键vbKeyF2 113 F2 键vbKeyF3 114 F3 键vbKeyF4 115 F4 键vbKeyF5 116 F5 键vbKeyF6 117 F6 键vbKeyF7 118 F7 键vbKeyF8 119 F8 键vbKeyF9 120 F9 键vbKeyF10 121 F10 键vbKeyF11 122 F11 键vbKeyF12 123 F12 键vbKeyF13 124 F13 键vbKeyF14 125 F14 键vbKeyF15 126 F15 键vbKeyF16 127 F16 键。
VB的KeyAscii码键位大全
VB的KeyAscii码大全16进制vbKeyLButton 0x1 鼠标左键vbKeyRButton 0x2 鼠标右键vbKeyCancel 0x3 CANCEL 键vbKeyMButton 0x4 鼠标中键vbKeyBack 0x8 BACKSPACE 键vbKeyTab 0x9 TAB 键vbKeyClear 0xC CLEAR 键vbKeyReturn 0xD ENTER 键vbKeyShift 0x10 SHIFT 键vbKeyControl 0x11 CTRL 键vbKeyMenu 0x12 MENU 键vbKeyPause 0x13 PAUSE 键vbKeyCapital 0x14 CAPS LOCK 键vbKeyEscape 0x1B ESC 键vbKeySpace 0x20 SPACEBAR 键vbKeyPageUp 0x21 PAGE UP 键vbKeyPageDown 0x22 PAGE DOWN 键vbKeyEnd 0x23 END 键vbKeyHome 0x24 HOME 键vbKeyLeft 0x25 LEFT ARROW 键vbKeyUp 0x26 UP ARROW 键vbKeyRight 0x27 RIGHT ARROW 键vbKeyDown 0x28 DOWN ARROW 键vbKeySelect 0x29 SELECT 键vbKeyPrint 0x2A PRINT SCREEN 键vbKeyExecute 0x2B EXECUTE 键vbKeySnapshot 0x2C SNAPSHOT 键vbKeyInsert 0x2D INSERT 键vbKeyDelete 0x2E DELETE 键vbKeyHelp 0x2F HELP 键vbKeyNumlock 0x90 NUM LOCK 键A至Z 键与A–Z 字母的ASCII 码相同:常数值描述vbKeyA 65 A键vbKeyB 66 B 键vbKeyC 67 C 键vbKeyD 68 D 键vbKeyE 69 E 键vbKeyF 70 F 键vbKeyG 71 G 键vbKeyH 72 H 键vbKeyI 73 I 键vbKeyJ 74 J 键vbKeyK 75 K 键vbKeyL 76 L 键vbKeyM 77 M 键vbKeyN 78 N 键vbKeyO 79 O 键vbKeyP 80 P 键vbKeyQ 81 Q 键vbKeyR 82 R 键vbKeyS 83 S 键vbKeyT 84 T 键vbKeyU 85 U 键vbKeyV 86 V 键vbKeyW 87 W 键vbKeyX 88 X 键vbKeyY 89 Y键vbKeyZ 90 Z 键0 至9 键与数字0 –9 的ASCII 码相同:常数值描述vbKey0 48 0 键vbKey1 49 1 键vbKey2 50 2 键vbKey3 51 3 键vbKey4 52 4 键vbKey5 53 5 键vbKey6 54 6 键vbKey7 55 7 键vbKey8 56 8 键vbKey9 57 9 键下列常数代表数字键盘上的键:常数值描述vbKeyNumpad0 0x60 0 键vbKeyNumpad1 0x61 1 键vbKeyNumpad2 0x62 2 键vbKeyNumpad3 0x63 3 键vbKeyNumpad4 0x64 4 键vbKeyNumpad5 0x65 5 键vbKeyNumpad6 0x66 6 键vbKeyNumpad7 0x67 7 键vbKeyNumpad8 0x68 8 键vbKeyNumpad9 0x69 9 键vbKeyMultiply 0x6A MULTIPLICA TION SIGN (*) 键vbKeyAdd 0x6B PLUS SIGN (+) 键vbKeySeparator 0x6C ENTER 键vbKeySubtract 0x6D MINUS SIGN (–) 键vbKeyDecimal 0x6E DECIMAL POINT (.) 键vbKeyDivide 0x6F DIVISION SIGN (/) 键下列常数代表功能键:常数值描述vbKeyF1 0x70 F1 键vbKeyF2 0x71 F2 键vbKeyF3 0x72 F3 键vbKeyF4 0x73 F4 键vbKeyF5 0x74 F5 键vbKeyF6 0x75 F6 键vbKeyF7 0x76 F7 键vbKeyF8 0x77 F8 键vbKeyF9 0x78 F9 键vbKeyF10 0x79 F10 键vbKeyF11 0x7A F11 键vbKeyF12 0x7B F12 键vbKeyF13 0x7C F13 键vbKeyF14 0x7D F14 键vbKeyF15 0x7E F15 键vbKeyF16 0x7F F16 键。
VB键盘常量大全 256个虚拟键码
Public Const VK_LBUTTON = &H1 Public Const VK_RBUTTON = &H2 Public Const VK_CANCEL = &H3 Public Const VK_MBUTTON = &H4 Public Const VK_BACK = &H8 Public Const VK_TAB = &H9Public Const VK_CLEAR = &HC Public Const VK_RETURN = &HD Public Const VK_SHIFT = &H10 Public Const VK_CONTROL = &H11 Public Const VK_MENU = &H12 Public Const VK_PAUSE = &H13 Public Const VK_CAPITAL = &H14 Public Const VK_ESCAPE = &H1B Public Const VK_SPACE = &H20 Public Const VK_PRIOR = &H21 Public Const VK_NEXT = &H22 Public Const VK_END = &H23 Public Const VK_HOME = &H24 Public Const VK_LEFT = &H25 Public Const VK_UP = &H26Public Const VK_RIGHT = &H27 Public Const VK_DOWN = &H28 Public Const VK_Select = &H29 Public Const VK_PRINT = &H2A Public Const VK_EXECUTE = &H2B Public Const VK_SNAPSHOT = &H2C Public Const VK_Insert = &H2D Public Const VK_Delete = &H2E Public Const VK_HELP = &H2F Public Const VK_0 = &H30Public Const VK_1 = &H31Public Const VK_2 = &H32Public Const VK_3 = &H33Public Const VK_4 = &H34Public Const VK_5 = &H35Public Const VK_6 = &H36Public Const VK_7 = &H37Public Const VK_8 = &H38Public Const VK_9 = &H39Public Const VK_A = &H41Public Const VK_B = &H42Public Const VK_C = &H43Public Const VK_D = &H44Public Const VK_F = &H46Public Const VK_G = &H47Public Const VK_H = &H48Public Const VK_I = &H49Public Const VK_J = &H4APublic Const VK_K = &H4BPublic Const VK_L = &H4CPublic Const VK_M = &H4DPublic Const VK_N = &H4EPublic Const VK_O = &H4FPublic Const VK_P = &H50Public Const VK_Q = &H51Public Const VK_R = &H52Public Const VK_S = &H53Public Const VK_T = &H54Public Const VK_U = &H55Public Const VK_V = &H56Public Const VK_W = &H57Public Const VK_X = &H58Public Const VK_Y = &H59Public Const VK_Z = &H5APublic Const VK_STARTKEY = &H5B Public Const VK_CONTEXTKEY = &H5D Public Const VK_NUMPAD0 = &H60 Public Const VK_NUMPAD1 = &H61 Public Const VK_NUMPAD2 = &H62 Public Const VK_NUMPAD3 = &H63 Public Const VK_NUMPAD4 = &H64 Public Const VK_NUMPAD5 = &H65 Public Const VK_NUMPAD6 = &H66 Public Const VK_NUMPAD7 = &H67 Public Const VK_NUMPAD8 = &H68 Public Const VK_NUMPAD9 = &H69 Public Const VK_MULTIPLY = &H6A Public Const VK_ADD = &H6BPublic Const VK_SEPARATOR = &H6C Public Const VK_SUBTRACT = &H6D Public Const VK_DECIMAL = &H6E Public Const VK_DIVIDE = &H6FPublic Const VK_F1 = &H70Public Const VK_F2 = &H71Public Const VK_F3 = &H72Public Const VK_F4 = &H73Public Const VK_F6 = &H75Public Const VK_F7 = &H76Public Const VK_F8 = &H77Public Const VK_F9 = &H78Public Const VK_F10 = &H79Public Const VK_F11 = &H7APublic Const VK_F12 = &H7BPublic Const VK_F13 = &H7CPublic Const VK_F14 = &H7DPublic Const VK_F15 = &H7EPublic Const VK_F16 = &H7FPublic Const VK_F17 = &H80Public Const VK_F18 = &H81Public Const VK_F19 = &H82Public Const VK_F20 = &H83Public Const VK_F21 = &H84Public Const VK_F22 = &H85Public Const VK_F23 = &H86Public Const VK_F24 = &H87Public Const VK_NUMLOCK = &H90 Public Const VK_OEM_SCROLL = &H91 Public Const VK_OEM_1 = &HBA Public Const VK_OEM_PLUS = &HBB Public Const VK_OEM_COMMA = &HBC Public Const VK_OEM_MINUS = &HBD Public Const VK_OEM_PERIOD = &HBE Public Const VK_OEM_2 = &HBFPublic Const VK_OEM_3 = &HC0Public Const VK_OEM_4 = &HDB Public Const VK_OEM_5 = &HDC Public Const VK_OEM_6 = &HDD Public Const VK_OEM_7 = &HDE Public Const VK_OEM_8 = &HDFPublic Const VK_ICO_F17 = &HE0 Public Const VK_ICO_F18 = &HE1 Public Const VK_OEM102 = &HE2 Public Const VK_ICO_HELP = &HE3 Public Const VK_ICO_00 = &HE4Public Const VK_ICO_CLEAR = &HE6 Public Const VK_OEM_RESET = &HE9 Public Const VK_OEM_JUMP = &HEA Public Const VK_OEM_PA1 = &HEB Public Const VK_OEM_PA2 = &HECPublic Const VK_OEM_PA3 = &HEDPublic Const VK_OEM_WSCTRL = &HEEPublic Const VK_OEM_CUSEL = &HEFPublic Const VK_OEM_A TTN = &HF0Public Const VK_OEM_FINNISH = &HF1Public Const VK_OEM_COPY = &HF2Public Const VK_OEM_AUTO = &HF3Public Const VK_OEM_ENLW = &HF4Public Const VK_OEM_BACKTAB = &HF5Public Const VK_ATTN = &HF6Public Const VK_CRSEL = &HF7Public Const VK_EXSEL = &HF8Public Const VK_EREOF = &HF9Public Const VK_PLAY = &HFAPublic Const VK_ZOOM = &HFBPublic Const VK_NONAME = &HFCPublic Const VK_PA1 = &HFDPublic Const VK_OEM_CLEAR = &HFE虚拟键码虚拟键码保存在WM_KEYDOWN、WM_KEYUP、WM_SYSKEYDOWN和WM_SYSKEYUP 讯息的wParam参数中。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Public Const VK_LBUTTON = &H1 Public Const VK_RBUTTON = &H2 Public Const VK_CANCEL = &H3 Public Const VK_MBUTTON = &H4 Public Const VK_BACK = &H8 Public Const VK_TAB = &H9Public Const VK_CLEAR = &HC Public Const VK_RETURN = &HD Public Const VK_SHIFT = &H10 Public Const VK_CONTROL = &H11 Public Const VK_MENU = &H12 Public Const VK_PAUSE = &H13 Public Const VK_CAPITAL = &H14 Public Const VK_ESCAPE = &H1B Public Const VK_SPACE = &H20 Public Const VK_PRIOR = &H21 Public Const VK_NEXT = &H22 Public Const VK_END = &H23 Public Const VK_HOME = &H24 Public Const VK_LEFT = &H25 Public Const VK_UP = &H26Public Const VK_RIGHT = &H27 Public Const VK_DOWN = &H28 Public Const VK_Select = &H29 Public Const VK_PRINT = &H2A Public Const VK_EXECUTE = &H2B Public Const VK_SNAPSHOT = &H2C Public Const VK_Insert = &H2D Public Const VK_Delete = &H2E Public Const VK_HELP = &H2F Public Const VK_0 = &H30Public Const VK_1 = &H31Public Const VK_2 = &H32Public Const VK_3 = &H33Public Const VK_4 = &H34Public Const VK_5 = &H35Public Const VK_6 = &H36Public Const VK_7 = &H37Public Const VK_8 = &H38Public Const VK_9 = &H39Public Const VK_A = &H41Public Const VK_B = &H42Public Const VK_C = &H43Public Const VK_D = &H44Public Const VK_F = &H46Public Const VK_G = &H47Public Const VK_H = &H48Public Const VK_I = &H49Public Const VK_J = &H4APublic Const VK_K = &H4BPublic Const VK_L = &H4CPublic Const VK_M = &H4DPublic Const VK_N = &H4EPublic Const VK_O = &H4FPublic Const VK_P = &H50Public Const VK_Q = &H51Public Const VK_R = &H52Public Const VK_S = &H53Public Const VK_T = &H54Public Const VK_U = &H55Public Const VK_V = &H56Public Const VK_W = &H57Public Const VK_X = &H58Public Const VK_Y = &H59Public Const VK_Z = &H5APublic Const VK_STARTKEY = &H5B Public Const VK_CONTEXTKEY = &H5D Public Const VK_NUMPAD0 = &H60 Public Const VK_NUMPAD1 = &H61 Public Const VK_NUMPAD2 = &H62 Public Const VK_NUMPAD3 = &H63 Public Const VK_NUMPAD4 = &H64 Public Const VK_NUMPAD5 = &H65 Public Const VK_NUMPAD6 = &H66 Public Const VK_NUMPAD7 = &H67 Public Const VK_NUMPAD8 = &H68 Public Const VK_NUMPAD9 = &H69 Public Const VK_MULTIPLY = &H6A Public Const VK_ADD = &H6BPublic Const VK_SEPARATOR = &H6C Public Const VK_SUBTRACT = &H6D Public Const VK_DECIMAL = &H6E Public Const VK_DIVIDE = &H6FPublic Const VK_F1 = &H70Public Const VK_F2 = &H71Public Const VK_F3 = &H72Public Const VK_F4 = &H73Public Const VK_F6 = &H75Public Const VK_F7 = &H76Public Const VK_F8 = &H77Public Const VK_F9 = &H78Public Const VK_F10 = &H79Public Const VK_F11 = &H7APublic Const VK_F12 = &H7BPublic Const VK_F13 = &H7CPublic Const VK_F14 = &H7DPublic Const VK_F15 = &H7EPublic Const VK_F16 = &H7FPublic Const VK_F17 = &H80Public Const VK_F18 = &H81Public Const VK_F19 = &H82Public Const VK_F20 = &H83Public Const VK_F21 = &H84Public Const VK_F22 = &H85Public Const VK_F23 = &H86Public Const VK_F24 = &H87Public Const VK_NUMLOCK = &H90 Public Const VK_OEM_SCROLL = &H91 Public Const VK_OEM_1 = &HBA Public Const VK_OEM_PLUS = &HBB Public Const VK_OEM_COMMA = &HBC Public Const VK_OEM_MINUS = &HBD Public Const VK_OEM_PERIOD = &HBE Public Const VK_OEM_2 = &HBFPublic Const VK_OEM_3 = &HC0Public Const VK_OEM_4 = &HDB Public Const VK_OEM_5 = &HDC Public Const VK_OEM_6 = &HDD Public Const VK_OEM_7 = &HDE Public Const VK_OEM_8 = &HDFPublic Const VK_ICO_F17 = &HE0 Public Const VK_ICO_F18 = &HE1 Public Const VK_OEM102 = &HE2 Public Const VK_ICO_HELP = &HE3 Public Const VK_ICO_00 = &HE4Public Const VK_ICO_CLEAR = &HE6 Public Const VK_OEM_RESET = &HE9 Public Const VK_OEM_JUMP = &HEA Public Const VK_OEM_PA1 = &HEB Public Const VK_OEM_PA2 = &HECPublic Const VK_OEM_PA3 = &HEDPublic Const VK_OEM_WSCTRL = &HEEPublic Const VK_OEM_CUSEL = &HEFPublic Const VK_OEM_A TTN = &HF0Public Const VK_OEM_FINNISH = &HF1Public Const VK_OEM_COPY = &HF2Public Const VK_OEM_AUTO = &HF3Public Const VK_OEM_ENLW = &HF4Public Const VK_OEM_BACKTAB = &HF5Public Const VK_ATTN = &HF6Public Const VK_CRSEL = &HF7Public Const VK_EXSEL = &HF8Public Const VK_EREOF = &HF9Public Const VK_PLAY = &HFAPublic Const VK_ZOOM = &HFBPublic Const VK_NONAME = &HFCPublic Const VK_PA1 = &HFDPublic Const VK_OEM_CLEAR = &HFE虚拟键码虚拟键码保存在WM_KEYDOWN、WM_KEYUP、WM_SYSKEYDOWN和WM_SYSKEYUP 讯息的wParam参数中。