0

I've made a little program with windows forms that moves the cursor every now and then to avoid the screen saver to activate, but even if I see the cursor being moved the screen saver still gets activated.

I'm using the following commands:

Cursor = new Cursor(Cursor.Current.Handle);
Cursor.Position = new Point(Cursor.Position.X - 50, Cursor.Position.Y - 50);
Thread.Sleep(500);
Cursor.Position = new Point(Cursor.Position.X + 50, Cursor.Position.Y + 50);
Thread.Sleep(10000);

Time between sleeps and distances are high to see the actual movement.

Is there a way to avoid screen savers with automatic movements of the cursor as tried before?

Thanks!

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
Oburro
  • 1
  • 1
    https://stackoverflow.com/questions/49045701/prevent-screen-from-sleeping-with-c-sharp – Retired Ninja Dec 18 '20 at 21:02
  • It's not the changing mouse position that prevents a screen saver; it's receiving input from the user. From the screen saver's perspective, changing the mouse position is only a side-effect. – Joel Coehoorn Dec 18 '20 at 21:17

0 Answers0