Hi, Tim, pleased to meet you. Have a look at a piece of Delphi code I use for the purpose. It is a call to the win32 api, which you can do from Blitzmax also. It's OK if you aren't a Delphi programmer, the api call is the main thing:
function ToggleSaverActive(z:double):double; cdecl;
begin
if z=1 then
SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, 1, nil, SPIF_SENDWININICHANGE)
else
SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, 0, nil, SPIF_SENDWININICHANGE);
Result := 0;
end;
This would be the right way to do it. Tricking Windows by simulating activity would be the long way around.
function ToggleSaverActive(z:double):double; cdecl;
begin
if z=1 then
SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, 1, nil, SPIF_SENDWININICHANGE)
else
SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, 0, nil, SPIF_SENDWININICHANGE);
Result := 0;
end;
This would be the right way to do it. Tricking Windows by simulating activity would be the long way around.