VB键盘对应代码(国外英文资料).doc
文本预览下载声明
VB键盘对应代码(国外英文资料)
Asc will turn ascII letters
CRH to convert the ascII characters
Private Sub CMDO010_KeyDown (Shift As Integer)
The Select Case KeyCode
Case vbKeyUp
Txt020. SetFocus
Case vbKeyRight
CMDO020. SetFocus
End the Select
End Sub
The keys on the keyboard have ASCII code, right?
What is the parameter of shift as integer?
In the keydown event, the vbkey plus the English up, right, left means the arrow keys, and vbkeydown
Questioner: the son non-fish 79 - he came from sixth grade
The best answer
Ascll code
The key-code constant key value description of VB
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
VbKeyLButton 1 mouse left button
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
The vbKeyRButton 2 right-click
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
VbKeyCancel 3 the CANCEL button
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
VbKeyMButton 4 mouse button
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
8 the Backspace key vbKeyBack
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
VbKeyTab 9 the TAB key
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
显示全部