All, Thanks for the pointers to SetWindowsHookEx(). And yes hours of fun it turned out to be..... Not!!!! Now: - SetWindowsHookEx(WH_KEYBOARD, @MyProc, MainInstance, 0); allows me to trap keystrokes system wide If I have a "cmd.exe" that I have started with CreateProcess() and do the following: SetWindowsHookEx(WH_KEYBOARD, @MyHookProc, MainInstance, ProcessInformation.dwThreadID); This returns a hook handle, but does not seem to hook the keystrokes from the process (ie. Cmd.EXE). Someone has just mentioned to me that the above will work if the above code is in a seperate DLL and not in the main EXE. Why is this so? Or am I missing something obvious here? TIA ------------------------------------------------------------------------ --Donovan [[EMAIL PROTECTED]] Donovan J. Edye [www.edye.wattle.id.au] Namadgi Systems, Delphi Developer [www.namsys.com.au] Voice: +61 2 6285-3460 Fax: +61 2 6285-3459 TVisualBasic = Class(None); Heard just before the 'Big Bang': "...Uh Oh...." ------------------------------------------------------------------------ GXExplorer [http://www.gxexplorer.org] Freeware Windows Explorer replacement. Also includes freeware delphi windows explorer components. ------------------------------------------------------------------------ --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi"