Registriert seit: 18. Mär 2004
Ort: Luxembourg
3.492 Beiträge
Delphi 7 Enterprise
|
AW: Keyboard Hook Key auslesen
5. Jul 2013, 22:33
Hier mal ein Beispiel aus der Praxis:
Delphi-Quellcode:
function KeyboardHookProc(Code: Integer; WordParam: WParam; LongParam: LParam): LongInt; stdcall;
begin
if (Screen.ActiveControl is TcxGridSite) and
(WordParam in [VK_DOWN, VK_UP, VK_LEFT, VK_RIGHT]) then
begin
if ((LongParam and (1 shl 31)) = 0) then // Bit 31 in LParam zeigt 0:Pressed 1:Released
Screen.ActiveControl.Perform(WM_KEYDOWN, WordParam, LOngParam);
exit;
end;
Result := CallNextHookEx(KBHook, Code, WordParam, LongParam);
end;
Ibi fas ubi proxima merces
sudo /Developer/Library/uninstall-devtools --mode=all
|
|
Zitat
|