Link to home
Start Free TrialLog in
Avatar of timothy1
timothy1

asked on

Screen Saver Programs

I asked a question a week ago and when I asked a follow-up question the expert never got back to me, so here we go again.

I would like to make screensvaer programs in visual basic. Actually I have made the programs. My original question was how do I get windows to recognise it and run it.

The answer that the other expert gave me was that I have to make another program that calls the EXE of the screensaver program and rename it's file extension .scr, I did this by creating the following:

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

I compiled the above and renamed it with the file extension of .scr and then placed it in my windows directory. I then went to windows properties dialogbox and selected this as my screensaver. The program did call the EXE listed in the sub main, but it didn't delay the 5 minutes that I have set in the windows property dialogbox. It just kept calling the program even after I closed it.

So I assume I have some code missing for the .scr program I wrote above. Or there is something else I am supposed to do.
What is the answer?
Avatar of TheAnswerMan
TheAnswerMan

.
ASKER CERTIFIED SOLUTION
Avatar of Dr. Kamal Mehdi
Dr. Kamal Mehdi
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of timothy1

ASKER

Now that's What I call an ANSWER!
Thks very much!

One follow up question. I use VB5, is that going to be a problem?
I don't think so.
I've just tested several 16-bit screen savers with my Win 95 and they worked just fine.
Good luck with your SCR.
I put the first one I did on my website as freeware

Go to: http://www.gladieux.com/downloads

It's not fancy, but it will do for the first one