Click here to Skip to main content
Click here to Skip to main content

Multi-monitor Warp Speed Screen Saver

, 21 Dec 2008 BSD
Rate this:
Please Sign up or sign in to vote.
High-speed screen saver simulating a warp-speed effect; will span multiple monitors.

Introduction

My son and I were watching a sci-fi show on television and saw a cool effect that simulated a spacecraft approaching light speed. Later he asked me if we could do something similar on the computer as a screen saver - this was our go at it.

Background

I found several C# starter programs that produced screen savers, but none of them I found would span multiple screens - this one does. It’s simple enough to be a good starting point for any other screen saver ideas you might have - if not, you can simply enjoy having this screen saver option in your collection.

Using the Code

To deploy the screen saver on your computer, you simply need to copy the binary file “Warp Speed.scr” to your Windows system32 folder (typically C:\Windows\system32\). Once there, the screen saver should appear on your system just like any other. There is a detailed set of options to tinker with for effect and the preview window works as well. Note that if you make modifications to the program and recompile, you will need to rename “Warp Speed.exe” to “Warp Speed.scr” and redeploy to your system folder. Here are some of the available options:

WarpSpeedOptions.JPG

Points of Interest

Of special interest to those wanting to write a screen saver that spans multiple monitors will be the ScreenArea class, here is an excerpt:

/// <summary>
/// Gets the least "x" coordinate of all screens on the system
/// </summary>
/// <returns>The smallest visible "x" screen coordinate</returns>
public static int LeftMostBound
{
    get
    {
        int leftBound = int.MaxValue;

        // Return the left-most "x" screen coordinate
        foreach (Screen display in Screen.AllScreens)
        {
            if (leftBound > display.Bounds.X)
                leftBound = display.Bounds.X;
        }

        return leftBound;
    }
}

This class allows the screen saver to calculate the bounds across all attached screens as follows:

// Screen saver is in full screen mode 
// (i.e., not the preview window) - make form span all available system screens
Left = ScreenArea.LeftMostBound;
Top = ScreenArea.TopMostBound;
Width = ScreenArea.TotalWidth;
Height = ScreenArea.TotalHeight;

History

  • 21st December, 2008: Initial post

License

This article, along with any associated source code and files, is licensed under The BSD License

Share

About the Author

James Ritchie Carroll
Architect
United States United States
No Biography provided

Comments and Discussions

 
GeneralMy vote of 5 Pinmembermanoj kumar choubey16-Apr-12 0:07 
GeneralMy vote of 5 PinmemberUSABebopKid24-Oct-11 6:02 
GeneralYay Pinmembermrwid14-Apr-11 23:04 
GeneralNice PinmemberAreJay23-Dec-08 9:46 
GeneralNice :) PinmemberGuillaume Leparmentier22-Dec-08 1:14 
GeneralRe: Nice :) PinmemberJames Ritchie Carroll22-Dec-08 12:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.1411028.1 | Last Updated 21 Dec 2008
Article Copyright 2008 by James Ritchie Carroll
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid