I've successfully disabled the screensaver using the method 开发者_StackOverflow社区described in this page.
The problem is that when I do this, the control panel dialog still indicates that there is an active screensaver. Nothing seems to be changed there. If the user checks it, he has no way of knowing why the screen saver doesn't work. Is this the expected behavior? Isn't this a problem?I'm on windows XP x64 fully patched with the latest updates.
I expect that SPI_SETSCREENSAVEACTIVE is intended for temporary suspension of the screensaver should be set to its prior value before application close. Registry munging is probably the way to effect a less transient change.
I'd suggest running procmon whilst disabling the screensaver via the control panel and whilst disabling it via your app to see what's different. A quick check on my machine seems to indicate that disabling should delete the key HKCU\Control Panel\Desktop\SCRNSAVE.EXE.
精彩评论