Solved

Screen Saver?

Posted on 1998-10-23
3
353 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

746 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now