Demo Screen Saver for Windows in Visual Basic 6

It is easy to make a screen saver for Windows. All you have to do is rename an .exe to an .scr and drop it into the \windows directory, right? Well, you could do that, but there would be numerous missing features:

[Java simulation of screen saver.]
Preview window.
When the user selects your saver from the list in the 'Display Properties' panel, there should be a miniature version of it executing.
On top.
Some windows place themselves 'on top' so that they are never hidden. Screen savers should hide them.
Multi-monitors.
Windows 98 has the under-hyped ability to extend one's desktop across up to nine monitors. Screen savers look pretty silly if they only run on the primary monitor.
Password protection.
Under Windows all screen savers are able to share the same central password scheme. It is up to each screen saver to follow the rules and honour the scheme.
Terminal locking.
What good is a password if the user can Ctrl-Alt-Del and nuke the saver? The saver needs to lock down the terminal.
Configuration.
Screen savers should launch a config form when the 'settings' button is pressed in the 'Display Properties' panel. The config should then be saved to the registry.
Context menu.
When you right-click on an .scr file, Test, Configure and Install are on the context menu. These should work.
NT support.
Windows NT handles screen savers quite differently (and more cleanly) than Windows 9x. But with NT one has to watch out for permission problems.

A thorough scan of the web revealed a number of good demos for making screen savers in VB, but none which supported all the features one would expect in a quality screen saver. I downloaded a slew of these demos, merged the good features, added some of my own, and created what I believe to be the most complete demo screen saver available. This is just the chassis; it takes care of all the evil OS plumbing and gives you a stable platform so you can get on with coding the graphics.

*
Download the Demo Screen Saver [12k zip]. Includes the compiled .scr (requires the Msvbvm60.dll runtime file) and the Visual Basic 6 source code. The code is free, use it as you see fit. Let me know if you find this demo helpful or if you have questions. For more technical details, I highly recommend How to write a 32bit screen saver.
 

The following people directly or indirectly contributed to this project:

  • Rod Stephens (Core functionality)
  • Neil Fraser (Integration & Win 98 multi-monitors)
  • Elliot Spencer (Win 9x locking & registry lookup)
  • Don Bradner & Jim Deutch (Password handling)
  • Lucian Wischik & Alex Millman (NT information)
-------------------------------------
Last modified: 18 September 1999