本文整理自网络,侵删。
CapLock(True); (* 大写 *) CapLock(False); (* 小写 *)
//(* 键盘大小写锁定 *)Procedure CapLock(bLockIt: boolean);Var Level : Integer; KeyState : TKeyBoardState;begin Level := GetKeyState(VK_CAPITAL); GetKeyboardState(KeyState); if bLockIt then KeyState[VK_CAPITAL] := 1 else KeyState[VK_CAPITAL] := 0; setKeyboardState(KeyState);end;
相关阅读 >>
Delphi ini 文件操作记要: 使用 tmeminifile
Delphi tlistview(tlistbox+图标显示)
Delphi xe2获取文件的 md5、crc、sha-1、sha-256、sha-512
更多相关阅读请进入《Delphi》频道 >>