How would you go about writting a screen saver. Im thinking something simple like displaying an image.
Does anyone have any resources that might help with this?
This is a discussion on Screen Saver within the Windows Programming forums, part of the Platform Specific Boards category; How would you go about writting a screen saver. Im thinking something simple like displaying an image. Does anyone have ...
Apparently, screen savers are just .exe files renamed with a .scr extension. From wotsit:
This is pretty old information, so I suppose it might have changed :shrug:Windows .SCR screen savers
SCR files are nothing more complex than .EXE files with the
extension SCR. Windows calls the .SCR file with two command-line
/s to launch the screensaver
/c to configure the screensaver
For the windows control panel to recognise the screensaver, the program's module description string must begin with SCRNSAVE: (in uppercase). So, if writing a Visual Basic screensaver, simply set the application title to something like "SCRNSAVE:Test Screensaver"
To create a new screen saver simply write a program that checks the
command-line option when starting and performs the appropriate
action. The display should use a full-screen window (usually with a
black background) and should end when any key is pressed or when the
mouse is moved.
When the program is compiled, rename the .EXE to .SCR and put it
into the Windows directory so it can be found by the screensaver
selection dialog in Windows.
Paul Oliver with thanks to Michael Poxon.
8th December 1996
"Think not but that I know these things; or think
I know them not: not therefore am I short
Of knowing what I ought."
-John Milton, Paradise Regained (1671)
"Work hard and it might happen."
Broadly speaking, that's true (as in, it'll work) but to be well-tied into Windows and make your life a bit easier it should also handle procedures such as ScreenSaverProc and RegisterDialogClasses.
It's hidden away in MSDN, but it's here.