Reputation: 95
I've build a WPF application and want to add global hotkey support. I want to be able to execute a method in my application from anywhere in windows, even when my application is minimized or running in tray. For example, execute the method with ctrl + alt + t.
Is this possible in WPF, and if so, how?
Upvotes: 2
Views: 9438
Reputation: 980
You need to take a look at RegisterHotKey in user32.dll. Here's a good example at pinvoke.net: http://www.pinvoke.net/default.aspx/user32/RegisterHotKey.html
Upvotes: 1