Solved

Screen Saver?

Posted on 1998-10-23
3
372 Views
Last Modified: 2010-04-30
Is there a way to make a VB program run as a screen saver?
I noticed that a program I downloaded put two files in the windows directory a .scr file and a .ini file, but the actual .exe file is int's it's own directory.
0
Comment
Question by:timothy1
  • 2
3 Comments
 

Accepted Solution

by:
Fantym earned 50 total points
ID: 1441384
The only difference between a Screen saver and a normal program is the extinsion.  Windows finds all programs with the .scr extension and lists them and their titles as Screen Savers.  You could make a program that is named .scr and it calls to an external .exe in a different directory.  The Settings part of the screen saver is sent as a command line switch /C .
And Example of this is:
         if Command$ = "/c" then frmSetting.show

Here is a useful api to hide the currsor

Declare Function ShowCursor Lib "user32" Alias _
"ShowCursor" (ByVal bShow As Long) As Long

bShow is either True or False

0
 

Author Comment

by:timothy1
ID: 1441385
What exactly do you put in the program that you call the  visual basic screensaver.exe with? And do you just write it on a .bas and then change the file extension?
0
 

Author Comment

by:timothy1
ID: 1441386
Well I made bas program and put the following in the sub main:

Dim returnvalue As Double
returnvalue = Shell("c:\windows\desktop\screensaver\GMscreensaver.EXE", 3)
AppActivate returnvalue
End

And then I changed the extension to the compiled program above to scr and selected it as my screensaver and it did call the listed program, but I got a runtime error # 6 overflow.

Plus it kept loading the screensaver program without waiting for the delay to start the screensaver that windows has. So I figure I got a bunch of missing code. What do I need to do?
0

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MsgBox 2 61
Hide vba in gp 7 115
Added a column screws up code 5 69
Error with a code discussed on this page 5 39
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question