Code archives/Miscellaneous/Windows Screen Saver

This code has been declared by its author to be Public Domain code.

Download source code

Windows Screen Saver by Kalle
(Posted 25 years ago)
Program your own (3D) Windows Screensaver.
I tested it with Win98 SE, but it should also work with any other 32Bit Windows...
;*******************************************************************************
;*                                                                             *
;* Windows Screensaver                                                         *
;* (Tested with Win98, but should also work with any other 32 Bit Windows)     *
;*                                                                             *
;* Code by Kalle (Pascal Gwosdek) (2002)                                       *
;*                                                                             *
;* Just insert your code instead of the comments below.                        *
;* When finished, create an executable and change the filename into <Name>.scr *
;* Now, you can handle it as a &quot;real&quot; screensaver...                           *
;* The preview in the installation screen is not supported. Another bug is     * 
;* that the Blitz Text window appears at every use, ignore it.                 *
;*                                                                             *
;* Have fun :-)                                                                *
;*                                                                             *
;*******************************************************************************

;Declarations

AppTitle &quot;ScreenSaver&quot;
ChangeDir SystemProperty$(&quot;appdir&quot;) ;This line is important when running as a Screensaver in Windows.
;Disable it while testing in Blitz (because the &quot;appdir&quot; of Blitz is &quot;\bin&quot;...) 
If CommandLine$() = &quot;&quot; Or Left$(CommandLine$(),2) = &quot;/C&quot; Or Left$(CommandLine$(),2) = &quot;/c&quot; Then ConfigScreensaver
If CommandLine$() = &quot;/S&quot; Or CommandLine$() = &quot;/s&quot; Then ExecuteScreensaver
End

;---------------------------------------

Function ConfigScreensaver()
;Code for config screen... If you want to, launch an external application (written in Delphi or 
;Visual Basic). You can save your data in an additional file. 

End
End Function

;---------------------------------------

Function ExecuteScreensaver()
;Graphics mode (fullscreen), double buffering command(s) and loading of images, meshes, sounds... 
FlushKeys
FlushMouse
MoveMouse 0,0
Repeat
	;Code for running screensaver...
	
Until MouseX() <> 0 Or MouseY() <> 0 Or GetKey() <> 0 Or GetMouse() <> 0
End
End Function