索引鍵 | 程式碼 |
BACKSPACE 刪除鍵 | {BACKSPACE}, {BS}, or {BKSP} |
BREAK 空白鍵 | {BREAK} |
CAPS LOCK 大寫鎖定鍵 | {CAPSLOCK} |
DELETE 刪除鍵 | {DELETE} or {DEL} |
向下鍵 | {DOWN} |
END 鍵 | {END} |
ENTER 鍵 | {ENTER}or ~ |
ESC 鍵 | {ESC} |
說明 | {HELP} |
HOME 鍵 | {HOME} |
INS 或 INSERT 鍵 | {INSERT} or {INS} |
向左鍵 | {LEFT} |
NUM LOCK 鍵 | {NUMLOCK} |
PAGE DOWN 鍵 | {PGDN} |
PAGE UP 鍵 | {PGUP} |
PRINT SCREEN 拍照鍵 | {PRTSC} (reserved for future use) |
向右鍵 | {RIGHT} |
SCROLL LOCK 鎖定捲動鍵 | {SCROLLLOCK} |
Tab 鍵 | {TAB} |
向上鍵 | {UP} |
F1 | {F1} |
F2 | {F2} |
F3 | {F3} |
F4 | {F4} |
F5 | {F5} |
F6 | {F6} |
F7 | {F7} |
F8 | {F8} |
F9 | {F9} |
F10 | {F10} |
F11 | {F11} |
F12 | {F12} |
F13 | {F13} |
F14 | {F14} |
F15 | {F15} |
F16 | {F16} |
Keypad add | {ADD} |
Keypad subtract | {SUBTRACT} |
Keypad multiply | {MULTIPLY} |
Keypad divide | {DIVIDE} |
SHIFT 鍵 | + |
CTRL 鍵 | ^ |
ALT 鍵 | % |
Code Snippet:
try
{
SendKeys.Send("{PRTSC}"); //send Print Screen Key
}
catch (InvalidOperationException ex)
{
MessageBox.Show(ex.ToString());
}
catch(ArgumentException ex)
{
MessageBox.Show(ex.ToString());
}
沒有留言:
張貼留言