You need to set a keyboard hook using the Windows API so that your app receives a message each time a key is pressed.

http://search.microsoft.com/results....=keyboard+hook
http://search.microsoft.com/results....-AU&FORM=QBME1

Following the first link on that second page led me to this also:

http://forums.microsoft.com/MSDN/Sho...14651&SiteID=1