Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Disabling a screen saver
Message
 
To
23/04/1998 17:23:14
Ray Watson
A Certified Electronics Co
Knoxville, Tennessee, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00093980
Message ID:
00094506
Views:
33
>George,
>
>Did it turn off the screen saver when the screen saver was active. And how did the exe know when to disable the screen saver, the screen saver couldn't have been active when you clicked on the desktop icon.
>
>Confused???
>
>Ray

Here's the full test program:
#DEFINE SPI_GETSCREENSAVEACTIVE    16
#DEFINE SPI_SETSCREENSAVEACTIVE    17
LOCAL lniparm, lnvparm, lnresult, lcmsg
DECLARE SHORT SystemParametersInfo IN Win32API;
  INTEGER uiAction, SHORT uiParam,;
  INTEGER @pvParam, INTEGER fWinIni
lnvparm = 0
lnresult = SystemParametersInfo(SPI_GETSCREENSAVEACTIVE, 0, @lnvparm, 0)
IF lnresult # 0
  DECLARE SHORT SystemParametersInfo IN Win32API;
    INTEGER uiAction, SHORT uiParam,;
    INTEGER pvParam, INTEGER fWinIni
  IF lnvparm = 0
    * Disabled, so enable it
    lniparm = 1
    lcmsg = "The screen saver has been enabled!"
  ELSE
    * Enabled, so disable it
    lniparm = 0
    lcmsg = "The screen saver has been disabled!"
  ENDIF
  lnresult = SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, lniparm, 0, 0)
  IF lnresult # 0
    = MESSAGEBOX(lcmsg, 64, "Screen Saver Test")
  ELSE
    = MESSAGEBOX("Unable to set the screen saver state!", 64, "Screen Saver Test")
  ENDIF
ELSE
  = MESSAGEBOX("Unable to retrieve Screen Saver setting!", 64, "Screen Saver Test")
ENDIF
RETURN
Hope this clears up any confusion.
George

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

Click here to load this message in the networking platform