[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Screen Saver?

Posted on 1998-10-23
3
Medium Priority
?
390 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Accepted Solution

by:
Fantym earned 100 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

649 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