开发者

How can I make my Windows Forms application 'listen' for global key presses?

开发者 https://www.devze.com 2022-12-28 15:45 出处:网络
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

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#?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号