I'm making a little application for taking notes. So when I type 'note' anywhere on my computer, my window will pop up and show me a textbox for me to type something in 开发者_Python百科and save it to XML.
I'm stumped on how to get the program to 'listen' to my keypresses. I'll have the app running on the system tray if that's any help. :)
Take a look at http://www.codeproject.com/KB/cs/globalhook.aspx
Besides this question has been asked around in SO already. Take a look at here:
Global Keyboard Hooks (C#)
Global keyboard capture in C# application
Best way to tackle global hotkey processing in c#?
精彩评论