How does my computer know when to activate the screensaver?

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, or 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.

Here's exactly what happens to start your screensaver:


  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?"
  2. 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.
  3. 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.

The screensaver will continue 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.

Here are some interesting links: