Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I deactive Screen Saver?
Message
From
28/09/1998 20:42:36
 
 
To
28/09/1998 20:23:14
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00141342
Message ID:
00141698
Views:
25
>Hi Mr. Ed Rauh.
>thanks for reply.
>but I have been more confuessed !@#!$%#% .... ^^:
>
>I've got a George Tasker's class on this site, but this class olny could
>disable, enable Screen Saver...
>
>But What I want to handle screen saver is force stopping.

I don't understnad - what is the difference between what George's class does, and what you would like to do? You might address email to him asking about the details of what he's actually doing internally.

The SystemParametersInfo() API call does a couple of things with the screen saver; it can enable/disable the current screen saver via the SPI_SETSCREENSAVEACTIVE action, which takes a BOOL (a SHORT with a value of 0 for false or 1 for true) for the uParam argument, and you can adjust the timeout delay for the screen saver via the SPI_SETSCREENSAVETIMEOUT action, which takes a number of seconds as a LONG for the uParam argument. Beyond that, I don't know; I do not program screen savers, and my needs are quite satisifed with these things.

You'll need to experiment to see how to use the API call to accomplish what you want. You might want to research the ScreenSaverConfigureDialog() API call and trhe Windows Shell Messages in the MSDN docmentation.

>
>add on... what can i get ths window's handle (screen saver's ) ??
>in other windows, i get this handle using FindWindow() but in screen saver
>has not a title so i don't know how can i get this handle.
>
>Do you Know???

As I said in my first message, i don't know what the handle for the default screen saver is; you're going to have to look into it yourself.

>
>sorry for my broken English...
>
>thanks....
>
>*******************************************
>The easiest way would be to use George Tasker's class in the Files section here on UT. In order to shut down the current screen saver, you either must use SendMessage() to message the screen saver, or better, to use SystemParametersInfo() with the SPI_SETSCREENSAVEACTIVE action. You'll need to look at how to set this up in the API documentation; if you have Visual Studio, it's documented in the API Help file, with specific values defined in WINBASE.H in the Visual C++ INCLUDES directory. SystemParametersInfo() should be callable for this directly from VFP without needing a wrapper function.
>
>
>This function is not part of the API, but is a generic part of a Screen Saver's public interface; this is the module that receives and processes Windows Messages in the screen saver itself. You can send requests to the screen saver via SendMessage() (you'd have to find the Window Handle for the screen saver first, and then send the appropriate message; I have no clue as to what messages are accepted by screen savers, or the Window name for the screen saver to use the FindWindow() function to get it.)
>****************************************************
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform