Sunday, 5 May 2019

Automatic mouse cursor move program

I needed a program to move the mouse cursor every so often to stop a PC from timing out while I was watching videos.

I didn't have admin rights for the PC so I could not adjust the timeout settings.


I use a TTimer to move the mouse cursor if input has been idle for a period of time and use a TTrackBar to set the length of the period of time.


The code to move the cursor uses the Windows API Mouse_Event() but doesn't actually move the cursor since it is set to move 0 pixels relative to the current cursor position.



No comments:

Post a Comment