How Screensavers Work

By: Jeff Tyson
The SETI@Home screensaver is a popular screensaver that actually does something useful.

For most people, a screensaver pops up whenever you leave your computer unattended for more than a couple of minutes. It may simply be a blank screen, a specialized program such as SETI@Home, or it could be something as outrageous as dancing macaroni.

But what is a screensaver exactly? What purpose does it serve? How does it know when to start? In this article, we will look behind the screen and check out just what's going on.

Advertisement

What is a Screensaver?

A screensaver is really just an executable file, with the extension changed from .exe to .scr. File extensions tell the computer what kind of file it is dealing with. For example, winword.exe is a word-processing application that can be loaded by the computer, while article.doc is a text file that can be loaded into the Microsoft Word word-processing application.

An executable file is a file that the computer's operating system considers a program or application. Files ending in .exe (or .scr) are expected to run without the need of another file; or, if they do need another file, they are expected to tell the computer which particular file is needed.

Advertisement

So we know that, in essence, a screensaver is a program. By putting a screensaver file into the Windows or System directory and giving it a .scr extension, Windows knows that it should treat this file as a screensaver and makes it available as an option in the Display properties window. The screensaver file can be programmed in several different ways. It can:

  • Simply present a black screen
  • Use vector graphics to draw various designs
  • Load and display a particular image or group of images
  • Display a particular line of text
  • Display an animation or series of animations
  • Play a video sequence
  • Have music or sound effects
  • Display information from another program or a Web site
  • Provide the ability to interact with another program or a Web site (For example, the HowStuffWorks screensaver keeps the mouse active, which allows you to click on several different icons to access specific areas of the HowStuffWorks Web site.)
  • Require a password to turn it off and return to the desktop

Most screensavers offer some combination of these features. Except for the slide-show screensavers that display a sequence of images, screensavers generally move an image, piece of text or animation around the screen. The screensavers that have a custom interface, and do not use the Display properties window at all, are less common. Usually, these screensavers do not have the .scr extension. They require that you install them using a setup program in order to configure them properly.

Advertisement

What Are Screensavers For?

Screensavers were originally designed to protect computer monitors from phosphor burn-in. Early CRT monitors, particularly monochrome ones, had problems with the same image being displayed for a long time. The phosphors, used to make the pixels in the display, would glow at a constant rate for such a long period of time that they would actually discolor the glass surface of the CRT. This discoloration would then be visible as a faint image overlaying whatever else was displayed on the monitor. Advances in display technology and the advent of energy-saver monitors have virtually eliminated the need for screensavers. But we still use them.

Here are the main reasons why:

Advertisement

  • Entertainment - The most common reason we use screensavers is for the fun of it. Watching that macaroni dance across the screen to the tune of "Hey Macarena" can be a great diversion for a few minutes.
  • Security - By setting up a screensaver with password protection, you can walk away from your computer and feel comfortable that nobody is going to be able to see any sensitive information.
  • Uniform look - Many companies require all employees to use a particular screensaver. This creates a uniform and perhaps aesthetic environment and ensures that no inappropriate screensavers are displayed.
  • Advertisement - Companies, particularly retail businesses, that have computers in areas accessible to customers will often have a screensaver that promotes their business or product.
  • Information - A lot of screensavers provide either static or real-time information. A screensaver may cycle through a series of trivia questions. Another may pull stock information from a Web site and stream it across the screen.
  • Distributed computing - Another form of screensaver takes advantage of your computer's inactivity to process data from another source. A good example of this type of screensaver is SETI@Home, which is currently utilized by thousands of computer users. This screensaver displays a graph of the radio spectrum and processes radio-signal information received from the SETI (Search for Extraterrestrial Intelligence) servers. It sends back results based on the data processed. By using the combined processing power of all of these computers, SETI is significantly reducing the amount of time it takes to sift through all the signals received from its radio telescopes.

Step by Step

We will go through the process of how a screensaver works based on a Windows 95/98 computer. Although the system commands and exact details may differ, the process is essentially the same for other computers as well.

Your computer constantly monitors the activity going on between the various components of the system. When it notes that the keyboard and mouse have been idle for the amount of time indicated in the screensaver settings of the Display properties window, the system sends a special command to the foreground (current) application to see if it can launch the screensaver. If an application is running that has a Computer Based Training (CBT) window open, or has a non-Windows program, such as one run from the MS-DOS prompt, as the foreground application, Windows will not start the screensaver.

Advertisement

Here's exactly what it does:

  1. To find out whether it can start the screensaver or not, Windows sends a message to the foreground application. This command is asking the application, "Can I start the screensaver?" A non-Windows program will not understand the command, and therefore will not answer it. A CBT application will understand it, but will respond with a command that means "No, I'm providing training right now." All other applications should respond positively to the command.
  2. Windows then looks at the line SCRNSAVE.EXE=____ in the system.ini file to see if a screensaver has been specified. If the entry is blank, it ignores the command to execute the screensaver. But if a filename is listed, it attempts to load that file. As long as the file listed is an actual screensaver, the program executes and creates the screensaver images on top of the current desktop.
  3. The screensaver continues to run until Windows detects input from the keyboard or mouse. With most screensavers, moving the mouse or pressing any key will immediately terminate the screensaver. But screensavers can be programmed to stop when only certain keys or buttons are pressed, or when the mouse is moved a certain distance. This feature is especially useful in interactive screensavers.
  4. When Windows gets input that it should terminate the screensaver, it checks to see if password protection is turned on. If it is, a box pops up requiring that you enter a user name and password. Otherwise, the screensaver simply terminates. When password protection is active, failure to supply the correct name and password will cause Windows to continue to run the screensaver program. While this provides some security, it is important to note that Windows 95/98 screensavers create their own password dialog boxes, and request the password and user information from the system. If you are not certain of the reliability of the source of the screensaver, be careful about using password protection. Hackers can and do create screensavers that use this weak point in system security to capture passwords. This is not an issue with systems running Windows NT, which only allows screensavers to call up the system password dialog box -- they can not create their own.

In the next section, you'll find out how to set up your own screensaver.

Advertisement

Your Own Screensaver

In Windows 95/98, you can configure a screensaver easily:

  1. Click Start, then click Settings and go to Control Panel.
  2. When the Control Panel window opens, double-click on the Display icon. This brings up the Display Properties window.
  3. Select the Screensaver tab, and select the screensaver you want to use from the drop-down menu.
  4. Determine how many minutes you want the system to be idle before Windows launches the screensaver, and enter that amount of time in the box provided.
  5. You can click on Preview to see what it will look like in full-screen use. If you want to change the settings, click Settings. Depending on the screensaver, this window can have one or more options that you can modify.
  6. Once you have finished changing the settings, click OK. You can also use the screensaver for security by checking the "Password protected" box. Click OK again and your screensaver is set to go!

There are several ways to get a screensaver:

Advertisement

  • Use one of the standard screensavers that comes with Windows
  • Buy a screensaver collection
  • Download one of the thousands of free screensavers on the Internet
  • Use a program that allows you to design your own screensavers
  • Create a screensaver from scratch by writing the actual code

Commercial screensaver collections were very popular several years ago, but the growth of the Internet has resulted in the availability of such a variety of free screensavers that few people are willing to pay for them anymore. Programs like Screen Saver Builder allow you to combine images, animations and sounds to create your own custom screensavers. If you are a programmer, there are numerous online resources that supply you with technical information, and even source code, so that you can write your own screensavers. And when you have created that incredible new screensaver that everyone is going to want, there are several sites that you can upload it to in order to share it with the world!

For more information on screensavers, including screensaver download sites, check out the links on the next page.

Advertisement

Advertisement

Loading...