I can’t find on google what reference I must use to be able to use RegisterHotKey. What is it?
And while on the topic, should I use RegisterHotKey if I am trying to create an application which listen for key combination in the background?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need a
DllImport, not just a reference. You can find tons more information at pinvoke.net.In short, if you add:
somewhere in your program, the only remaining tricky part is coming up with the
hWndto register to handle the key. The sample code linked at pinvoke.net above should help you use theDllImport.