Posted: Thu Jul 19, 2007 1:26 am Post subject: ShortCut?
hi i wondering 1 thing ....i got this But how do i make it count even if the window is active or not
procedure TForm1.ApplicationEvents1ShortCut(var Msg: TWMKey; var Handled: Boolean) ;
begin
if (Msg.CharCode = VK_F9) and
(GetKeyState(VK_SHIFT) < 0) and
(GetKeyState(VK_CONTROL) < 0) then
begin
ShowMessage('CTRL + SHIFT + F9 pressed!') ;
Handled := True;
end;
end;
RegisterHotKey will set up a global hot key, so I beleive (I never used this) that if you do not have focus on your application, the hot key should work. _________________
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum