programming tools for Windows applications development
  Home  |   SwiftForth Archive  |   SwiftX Archive  |

Re: How to power off the monitor?

From: Appert, Kevin <kevin.appert_at_lmco.com>
Date: Tue, 28 Nov 2006 11:04:03 -0800

As long as you aren't prone to C-sickness, there are lots of good examples here: <<<http://www.codeproject.com/>>>
Including this one which pertains to SC_MONITORwhatever <<<http://www.codeproject.com/system/display_states.asp>>>
<<<http://www.codeproject.com/useritems/Monitor_management_guide.asp>>>

Found with Google (and twenty-twenty requirements hindsight)
<<<http://www.google.com/search?hl=en&lr=&q=turn+off+monitor+power+code+windows>>>

-----Original Message-----
From: sftalk-bounce_at_forth.com [mailto:sftalk-bounce_at_forth.com] On Behalf Of Morten A. Steien
Sent: Tuesday, November 28, 2006 6:10 AM
To: sftalk_at_forth.com
Subject: [sftalk] Re: How to power off the monitor?

On Tue, 28 Nov 2006 09:21:55 +0100, Bruno Gauthier <bgauthier_at_free.fr> wrote:

> Morten A. Steien a écrit :
>> On Sat, 25 Nov 2006 18:40:19 +0100, Richard Owlett <rcowlett_at_atlascomm.net> wrote:
>>
>>> morten.steien_at_chello.no wrote:
>>>
>>>> Does anybody know how I can power off (and on) the monitor from my program?
>>>> <Snip>
>>
> Hi Morten,
>
> : MonitorSleep
> 500 sleep drop
> HWND_BROADCAST WM_SYSCOMMAND SC_MONITORPOWER 2 SendMessage drop \
> Power Off the monitor
> begin \
> ekey? \
> until \
> HWND_BROADCAST WM_SYSCOMMAND SC_MONITORPOWER -1 SendMessage drop \
> Power On the monitor
> ;

That was EXACTLY what I was looking for. :-)
I have searched a lot in google and masdn but could not find it.
Thank you very much for your help.

--
Med Vennlig Hilsen,
Morten A. Steien
----------------------------------------------------------------------
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 Tue Nov 28 2006 - 11:05:24 PST

This archive was generated by hypermail 2.2.0 : Tue Dec 02 2008 - 03:04:41 PST