Board index » delphi » GLOBAL HOT KEY - HELP NEEDED
stang...@aol.com (Stangate)
![]() Delphi Developer |
Tue, 05 Jun 2001 03:00:00 GMT
|
stang...@aol.com (Stangate)
![]() Delphi Developer |
Tue, 05 Jun 2001 03:00:00 GMT
GLOBAL HOT KEY - HELP NEEDED
I need a component or code outline to implement system-wide hot keys to enable
me to pop-up a small application no matter where I am in Windows 95/98. I would load the program and minimize it at start-up and want to pop it up Any help would be appreciated Peter Yellow |
Roel Spapen
![]() Delphi Developer |
Tue, 05 Jun 2001 03:00:00 GMT
Re:GLOBAL HOT KEY - HELP NEEDEDLook at RegisterHotKey or thereabouts in the win32.hlp file... it should do what you want. HTH QuoteStangate <stang...@aol.com> wrote: |
Barr
![]() Delphi Developer |
Wed, 06 Jun 2001 03:00:00 GMT
Re:GLOBAL HOT KEY - HELP NEEDEDHello All, Yes use the function RegisterHotKey which can be found in the Win32 I have a question though. When using Hot Keys added through I can use a function key, like F8, all day to repeatedly enter my Using De{*word*81} breakpoints, MSVC's Spy, and writing the I have noticed that if I make the hotkey SHFT+B and I set my playback It is like the keyboard keyups and keydowns get out of sync with the I am using Delphi 3 pro. Any clues or help greatly appreciated. Barry. QuoteRoel Spapens <ro...@stack.nl> wrote: |
Stanga
![]() Delphi Developer |
Wed, 06 Jun 2001 03:00:00 GMT
Re:GLOBAL HOT KEY - HELP NEEDEDHave tried Syshotkey from super page but cannot get the component on the pallette with Delphi 3. Any ideas how to do it - I've E-mailed the author |
Joakim Andersso
![]() Delphi Developer |
Sun, 10 Jun 2001 03:00:00 GMT
Re:GLOBAL HOT KEY - HELP NEEDEDHi Stangate... Try to use API hooks! /Joakim Andersson Sweden How to use Hooks A Hook is defined in the Win API help as, "a point in the Microsoft? Basically the idea is, you want the message long before your form gets function KeyBoardCallback (Code : Integer; WParam : Word; LParam : Longint) : LongInt; begin { Setting the result to 0, tells windows to pass on the message } Result := 0; { Check to see if it's the hot key } If ((GetKeyState(HK_Key) < 0) and (GetKeyState(HK_Shift) < 0)) then begin { Here's where we do our stuff when the hotkey is pressed } ShowMessage('Hot key pressed'); { So we don't get help by accident - because I'm using Shift-F1 as my hotkey } Result := 1; end; { call the next hook incase there are others } CallNextHookEx(gHook, code, Wparam, Lparam); end; I've declared HK_Key and HK_Shift in the const section of the unit. This { This sets up the hook } If (gHook = 0) then ShowMessage('Not Hooked'); Then at the end of your program, you'll want to unhook the callback. { This unhooks the hook } If not(UnHookWindowsHookEx(gHook)) then ShowMessage('Couldnt Unhook'); That's all there is to hooks. I've made the source available so you can |
Stanga
![]() Delphi Developer |
Mon, 11 Jun 2001 03:00:00 GMT
Re:GLOBAL HOT KEY - HELP NEEDEDThanks for your help Happy Christmas |
1. Single key vs Alt+key hot keys under Delphi 5
2. Standard for function-keys and hot-keys?
3. TStringGrid and Hot Keyed Buttons on Form - Help!
4. Newbie needs help with Global Dive Supply Example
5. Need help using global variables
6. Hot keys
8. D4: Hot Keys Are Being Keyboard Buffered?