0

Im developing a WINDOWS SERVICE that is just suposed to log the mouse position every 10 sec. The problem is that i cant get the mouse position... i call user32 for the method "GetCursorPos(ref Point)" but i always get |0,0|

can anyone tell me how to properly get the position?

Leonardo
  • 9,691
  • 9
  • 56
  • 137

1 Answers1

0

The best way to accomplish this is probably to write a system tray application.

You can do this in a windows service if you make that service interactive, but there are a number of security issues if you go down that route.

For full details refer to

http://www.freelists.org/post/program-l/C-creating-a-service-that-logs-mouse-and-keyboard-input,1

Community
  • 1
  • 1
Eric J.
  • 143,945
  • 62
  • 324
  • 540