Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Screen Saver
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00100295
Message ID:
00100318
Vues:
19
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform