Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Screen Saver
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00100295
Message ID:
00100318
Views:
20
>George,
>Turning off the screen saver would seem the correct and faster choice. If you could give that API call it would probaably solve all the remaining issues for me.
>
>Thanks
The following will turn the screen saver off and back on.
#DEFINE SPI_SETSCREENSAVEACTIVE    17
DECLARE SHORT SystemParametersInfo IN Win32API;
  INTEGER uiAction, SHORT uiParam,;
  INTEGER pvParam, INTEGER fWinIni
* Turn screen saver off
lniparm = 0
* lnresult will not be equal to zero if the function succeeds
lnresult = SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, lniparm, 0, 0)
*
* Your routine here
*
* Turn screen save back on
lniparm = 1
lnresult = SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, lniparm, 0, 0)
This assumes that the screen saver has not been already turned off. There is a way to test this condition which requires a slightly different version of this declaration and parameter list.

hth,
George

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

Click here to load this message in the networking platform