• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 173
  • Last Modified:

How to create a screen saver in VB?

How would one go about creating a screen saver (.scr) in visual basic 5 ?  I know it can be done, but how?

Any help would be great!
Thanx in advance,
  • 3
1 Solution
I will send you a sample project of screen saver let me know your e-mail ID
Here is the step by step "How to makeer a screen saver" that has been in some paq's that I answered. Let me know if you have anyquestions.

A couple of things are: Make your the boardstyle of your  form (the one you want to show as SS) to none, and show it as maximized.

To sirigere: you should not lock a question when you are not providing an answer.


Screen savers are simply .exe files renamed to .scr.
There are only a few things you need  to do.

Make the project start up from Sub Main. Do this by going
to Tools | Options | Project and selecting the
Start-up form as Sub Main.
This Sub should look something like this:

  Sub main()
  ' Check to see if we should blank the screen, or display
  ' the Setup dialog box.

   If InStr(Command$, "/c") Then ' looks in command string for screen saver parameters
      SetupForm.Show 1
      ElseIf InStr(Command$, "/s") Then
      End If

   ' Wait until there are no form visible, then quit.
    While DoEvents() > 0 ' Loop until no forms visible
  End Sub

   This is all you really need but this won't look very good.
On the setup form you can put all your parameters and save them to an
INI or the system registry.  You can add routines to the blank form so that
the screen saver actually does something; like animations, flashing colours,
dots and lines etc. etc.   But there are some more important things, the Mouse
Pointer still shows. So, we'll use an API to get rid of it. Put this in the
declarations section of the module:

Declare Function ShowCursor Lib "user32" Alias "ShowCursor" (ByVal bShow As Long) As Long
Then add these subs:

 Sub HideMouse()
    While ShowCursor(False) >= 0
   End Sub

 Sub ShowMouse()
       While ShowCursor(True) < 0
    End Sub

 Call the HideMouse() from the Blankform's Load event
  and the ShowMouse() from the UnLoad.
rob2000Author Commented:
Thank you very much Dalin!
If my answer worked for you, you should reject sirigere's answer and reopen the question so that I can relock in.
Thank you for your attention.
Thank you, rob2000.
Good luck in your project.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now