title: Disable and Enable Screen Saver in Windows 7
body: <p>I have an application than disables the screen saver temporarily in order to run a slide show. I use this to turn it on or off:</p>
  
  <pre><code>i = SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, active, Nothing, SPIF_SENDWININICHANGE)
  </code></pre>
  
  <p>This works fine in XP. In Windows 7, it disables the screen saver properly. However, when it is enabled again, at the normal time for the screen saver to come on, the system asks for a password instead of showing the screen saver.</p>
  
  <p>From this time on until the screen saver settings are adjusted in the control panel, the password screen is displayed in place of the screen saver.</p>
  
  <p>Is there something else I should be doing for Windows 7? I understand that SPI_GETSCREENSAVEACTIVE is not supported in Windows 7, but SPI_SETSCREENSAVEACTIVE is supposed to be.</p>