Search Tools Links Login

How to make screen savers.


Visual Basic 6, or VB Classic

this shows you the correct way to make screen savers in vb.

Original Author: MudBlud

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!!!!

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 100 times

Categories

Visual Basic 6

Attachments

How to mak244678112001.zip
Posted: 9/3/2020 3:45:00 PM
Size: 6,606 bytes


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.