EXE to Screen Saver

I want my whole application to be a Screen Saver. If a rename .exe to .scr it considers the application as Screen Saver. My problem is, as soon I select  my Screen saver from the properties dialog of windows, it starts running the screen saver in full screen, which is supposed to run in the small screen provied within properties Dialog. Kindly let me know the solution for this.
Thank You.
USHASHIAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Erick37Commented:
MS article:

"HOWTO: Create a Screen Saver in Visual Basic"
http://support.microsoft.com/support/kb/articles/Q146/9/07.asp

**Make sure that you include the code to prevent multiple instances of your program from running.**
0
TimCotteeHead of Software ServicesCommented:
You need to make sure that you support the command line argument screensaver.scr /p hWnd

the /p indicates that the exe should run as a preview in the window described by hWnd. You would probably need to parse the command line using

strCommandLine = Command()

and if /p is there use the hWnd and the setparent api call to place your application in the window defined.

I haven't tried this myself though I have done it the other way around, by having multiple windows previewing different screen savers in a vb front end. (You can even have multiple screensavers running in the same preview window!)
0
Jeremy_DCommented:
Eric37: If you create the screensaver the way described in the article, then will VB register the app as a 'WindowsScreenSaverClass'-class window, or will it still be a ThunderForm-class window? (of course I could test this myself, but if you know allready it could save me some time ;-)

0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Erick37Commented:
No, the window class will not change.
TimCottee is correct, you MUST also provide /P support for preview.

Here is a sample VB5 screen saver which supports the preview switch:

http://www.arcatapet.com/vbsource/jdsvrvb5.zip
0
VBGuruCommented:
You should install your Screen Saver using the following command.
           
command:  rundll32.exe desk.cpl,InstallScreenSaver c:\win\system\Flying Windows.scr
result:  Installs the new screen saver and runs the display/screen saver preview property page
 
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
USHASHIAuthor Commented:
Thanks VbGuru.
0
VBGuruCommented:
welcome
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.