I won't tell you how to do it, since I'm doing it for money in a
project of mine, but I can give you some ideas to start with... then
you follow from there and study it yourself ;)

First, you'll need a system wide hook, and that's only possible with
the hook being in a DLL. If you put the hook inside your EXE, it won't
be a system wide hook, only a local application hook. It'll let you
capture keys, but not block them. Only in a DLL you'll be able to
block them.

Next, you'll need a really low level hook, not a simple keyboard hook.
Delphi 7 doesn't support it out-of-the-box since it's a Win2k/XP/2003
specific function, you'll have to dig it up... for Win9x/Me you can
use a general keyboard hook ;).

More info here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/hooks/hookreference/hookfunctions/lowlevelkeyboardproc.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/hooks/hookreference/hookfunctions/setwindowshookex.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/hooks/hookreference/hookfunctions/callnexthookex.asp

This is all you need, just port it to Delphi, and if done right, it'll
work :)

--- In [email protected], "Philbert" <[EMAIL PROTECTED]> wrote:
> 
> I would like to capture the WIndows keys such as ALT+TAB, Windows key, 
> and other special Window key and key combinations from my application. 
> Any assistance on how to go about it will be appreciated. I'm using 
> Delphi 6 Enterprise.
> 
> PHilbert.





-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to