Re: Screen saver

From: Leon Wagner <leon_at_forth.com>
Date: Thu, 31 Mar 2005 08:07:07 -0800

Works fine for me:

4 IMPORT: SystemParametersInfo

VARIABLE PV

SPI_GETSCREENSAVETIMEOUT 0 PV 0 SystemParametersInfo
. 1
PV ? 600

SPI_SETSCREENSAVETIMEOUT 60 0 0 SystemParametersInfo
. 1

SPI_GETSCREENSAVETIMEOUT 0 PV 0 SystemParametersInfo
PV ? 60

First call returned timeout of 600. I set it to 60 then read it back and
it's 60. Note non-zero return codes (1) in all cases.

> -----Original Message-----
> From: sftalk-bounce_at_forth.com [mailto:sftalk-bounce_at_forth.com]On Behalf
> Of Rob
> Sent: Thursday, March 31, 2005 5:46 AM
> To: sftalk_at_forth.com
> Subject: [sftalk] Screen saver
>
>
> Hello everyone,
> I am currently 'trying' to set the screen saver timeout using the
> *SystemParametersInfo
> *function located at
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/s
ysinfo/base/systemparametersinfo.asp
>
> I can read the value ok but I am having trouble setting the value, I
> keep returning a zero which is an error.
> A typical segment of code for setting is
>
> SPI_SETSCREENSAVETIMEOUT 60 0 0 SystemParametersInfo
>
>
> The following code for reading works ok
>
> variable pv
> SPI_GETSCREENSAVETIMEOUT 0 pv 0 SystemParametersInfo
> pv @ .
> 60
>
> Anybody have any ideas on the correct way to set the value?
>
> Many regards
>
> Rob
>
>
> ----------------------------------------------------------------------
> sftalk_at_forth.com The SwiftForth programming discussion email list
> To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
> For list command help, send subject "help" to sftalk-request_at_forth.com
> Message archives are located at http://www.forth.com/archive/sftalk
> ----------------------------------------------------------------------
> This list is a forum for SwiftForth users. For product support and bug
> reports, please send email to support_at_forth.com
> ----------------------------------------------------------------------
>
>

----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and bug
reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Thu Mar 31 2005 - 08:09:20 PST


Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!

This archive was generated 09-Feb-2012. Archive updated nightly.