http://www.betterwebber.com/stuff/FB_ScreenSaverKit.zip
Just unzip, and include this at the top of your program:
Code: Select all
#include "FB_ScreenSaverKit.bas"
StartScreenSaver
Pset (x, y), colr
'...
Then you can just start using Pset, Line, etc. It sets up a NULL GFXLib driver, and copies that to a window 60 times a second. If the screensaver is in preview mode, it stretches it so it fits in that little box. If you include a dialog resource called "FB_SCRNSAVE_ABOUT" it will display that and close it when the "IDOK" button is pressed, or show a messagebox if a resource isn't included.
Packaged is the kit, and a conversion of Mambazo's "Doodle" demo. Notice how the preview box and settings button work, and how there's no code related to that stuff in the actual program, FB_ScreenSaverKit.bas takes care of it all.
If you want/need a real settings box, then I might make a function where if you include a different dialog name it makes a modal dialog and lets you hook the message loop, and it doesn't save much effort unless I made a mechanism to save registry keys, which I don't feel like doing because I like registry undiddled.