To prevent a screen-saver from kicking in [WayBack] jiggling the mouse – twm’s blog:
My solution then is this procedure:
procedure JiggleMouse; var Inpt: TInput; begin Inpt.Itype := INPUT_MOUSE; Inpt.mi.dx := 0; Inpt.mi.dy := 0; Inpt.mi.mouseData := 0; Inpt.mi.dwFlags := MOUSEEVENTF_MOVE; Inpt.mi.time := 0; Inpt.mi.dwExtraInfo := 0; SendInput(1, Inpt, SizeOf(Inpt)); end;Call it in regular intervals and the screen saver will not start.
This is now (or soon will be) in the u_dzOsUtils unit which is part of my dzlib utility library.
–jeroen