Click here to Skip to main content
15,920,896 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Could anyone tell me how to implement KeyPress event in a windows service for keyboard keys(not for controls)

I want to track the number of times i pressed the Enter Key irrespective of
how many application I opened and did some work, on the background i want a counter that shows the
count of number of times enter key is pressed
Posted

You can't, because the service does not have a window to have focus. You probably mean you want to write a system wide keyboard hook.
 
Share this answer
 
In that case could u tell me how to implement a windows hook
a simple ones,

i searched on the google but couldn't find related ones
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900