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
  • 10,737
  • 10
  • 62
  • 155

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.
  • 147,927
  • 63
  • 340
  • 553