Hey, how do i disable the screensaver in windows? (sorry for the non-opengl Q!)

Select ‘None’ as screensaver maybe…

i mean …within my app, not in the display settings…i just want to disable it whilst doin my rendering etc etc…so the screensaver doesnt pop up when i leave my app sitting for a while.

hi there,

you have to tell windows a screen saver
is already running with a call to

SystemParametersInfo(SPI_SCREENSAVERRUNNING, Word(enabled), @OldValue, 0);

Hope it helps


The system sends you a WM_SYSCOMMAND message with wParam == SC_SCREENSAVE when the screensaver is about to be activated. When you return zero the screensaver is started, otherwise it is not. That doesn’t work with MFC OnSysCommand because you cannot return nonzero there.