Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Disabling a screen saver
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00093980
Message ID:
00094630
Views:
33
>>
>>I'm at home now, so this response won't be comprehensive, and may not be able to provide an answer. I'll do some checking in the morning. The function determines whether or not a screen saver is available to be run, not if it's already running. So there's a bit of a misunderstanding here.
>>
>>I'll going to do two things tomorrow (at the office) to see if there's a solution. One is to check around and see if there's a way to determine if a screen saver is already running. The other is to see if there's a programmatic way to stop it. I've a couple of ideas on both, but don't know for sure.
>>
>>'Til tomorrow.
>
>Hey Guys:
>
>I too am home but I thought the idea was to _disable_ the screen saver. Maybe I am missing something here but, if a timer is running, then can't you stuff the keyboard at an interval to clear the screen saver? I don't think that a messagebox by itself will do it because events will suspend.
>
>Me and MGD are guessing at this.

Donald,

That's what I thought too. Detecting whether or not a screen is saver is running might prove to be much more trickier than other windows programs. Screen savers, while nothing more than a Window's executable with a SCR extension, have characteristics quite unlike other programs. No title bar, so you can't scan the open windows for one. It terminates whenever there's user interaction with the keyboard or mouse, and so on. It should have, and I don't know this for certain, a WNDCLASS structure associated with it, but then what are the characteristics you'd want to look for, that all screen savers have? In fact, in examining this sstructure, I don't see anything that I can point to and say, "Well, if this member is this, then..."

As for stuffing the keyboard, I'd hesitate before I did something like that. There's a pretty good risk that you might inadvertantly add or remove some data. Programmatically moving the mouse from its current location one pixel and back, might be a better bet, but I don't know if that would work (haven't tried it).

Looking at the purpose of screen savers, according to MS. It's twofold, one is to protect the monitor, the other is to protect sensitive information. How this is approached then should take this into account. If the problem is that there's a lengthy procedure that has to occur, I'd simply disable the screen saver, execute the procedure, put up a message box when it completes, then re-enable it. Otherwise, I wouldn't fool with it. Of course, I'm not Ray, and I don't know the full extend of his needs.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform