Actually, I had not tried running it as administrator. It turns out that indeed, if I run the "MouseKeyboardActivityMonitor.Demo.exe" project as admin, the keys and mouse activity is correctly interpreted.
So that's good, except that with my specific project, I would really prefer to not have to run it as admin.
I now believe that the problem has to do with the fact that services.msc, and other similar applications, have to be run as admin. I tried other windows launched from "Control Panel\Administrative Tools" and they all had this same "problem".
If I run my project as admin, the keys are interpreted.
Is there any way to get around this without running my project as admin? I just don't really want to have the extra step of having the "An unidentified program wants access to your computer" dialog coming up and having the user "allow" it.
My project runs fine for any other windows. The ideal solution would be to programmatically detect whether the "run as admin" window is the foreground window and then conditionally run code with admin rights so that the keys are detected. Is there
any way the code in the MKAM project can be adjusted to get around this issue? Is there a way to programmatically (C# .net 3.5) determine if a window has been run as admin and maybe warn the user that my program would have to be restarted as admin?
Not an ideal solution, but if the MKAM project cannot be adapted to handle this situation, maybe that would be okay.
What has changed between Windows 7 and Vista that makes MKAM work with "run as admin" windows properly?