Solved

Screen Saver?

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

863 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

23 Experts available now in Live!

Get 1:1 Help Now