Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Disabling a screen saver
Message
From
22/04/1998 11:34:23
 
 
To
22/04/1998 10:05:51
Ray Watson
A Certified Electronics Co
Knoxville, Tennessee, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00093980
Message ID:
00094025
Views:
45
>Hi,
>I have a application (VFP5) that reads a message dbf and uses MESSAGEBOX to display any un-read messages, but if the users screen saver is active the user does not see the message until he accesses his computer.
>
>Is there any way to stop the screen saver from within VFP5?
>
>Thanks in advance
>Ray

Ray,

When windows wants to start a screensaver it sends the WM_SYSCOMMAND message with the wParam parameter set to SC_SCREENSAVE to the current active app. To stop the screensaver being activated, you need to intercept this message and stop it from being handled by the default message hander. I don't know how to do this in VFP.

Another way would be to use the SystemParametersInfo API function to either check if the screen saver is running or just plain deactivate it before your routine.

HTH,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform