README.md
December 4, 2022 ยท View on GitHub
Description
this shows you the correct way to make screen savers in vb.
More Info
| Submitted On | 2001-08-11 19:54:32 |
| By | MudBlud |
| Level | Intermediate |
| User Rating | 4.8 (19 globes from 4 users) |
| Compatibility | VB 5.0, VB 6.0 |
| Category | Coding Standards |
| World | Visual Basic |
| Archive File | How to mak244678112001.zip |
Source Code
How to make screen savers.
Application Title:
A Windows screen saver is nothing more that a regular Windows executable file that has been renamed with the .scr extension. In Visual Basic, when you are making the executable file, you will need to set the Application Title in the Make EXE dialog box. This Application Title MUST be set to "SCRNSAVE title", where title is the text you want displayed in the Control Panel screen saver dropdown box.
Command Line Arguments:
When Windows starts up a screen saver it calls it with the "/s" argument, and when it wants to Setup the screen saver it uses the "/c" argument.
Screen Saver Running?:
You must tell windows that the screen saver is running. if you
dont windows will run your screen saver more than once if you
leave your computer long enough. To do this you call:
SystemParametersInfo(SPI_SETSCREENSAVEACTIVE,
0, ByVal 0&, 0)
Hiding the cursor:
When you make a screen saver you want to
hide the cursor right? after all, your suppost to be idle why
would you need one, it just makes your screen saver look bad. So
to hide it you use ShowCursor:
ShowCursor (True) shows it and HideCursor (False) hides it, easy
huh!
When do i go back to windows?:
When you move the mouse or hit a key
the screen saver should close....ok
you can detect these by _mousemove events and _keypress events.
Also you need to call:
SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, 1, ByVal 0&, 0)
so windows knows that it can load a screensaver again.
Now to the source code!!!!