How can I record click strokes and then put them into an array? Also does the window always need to be in focus for it to work? How can I avoid this.
Share
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.
The requirement that this works without having a focused window is the more difficult one. You need to use a low-level mouse hook with the SetWindowsHookEx() API function. This requires P/Invoke, a good example is available in this blog post.