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?
>>>
>>> Regards,
>>> Morten A. Steien
>>>
>> Operating on 3 hours sleep after driving 17, "simple" answer is "no" ;)
>>
>> A more useful reply would be:
>> 1. Exactly what do you wish to accomplish. Actually removing AC line
>> power from the monitor would require external hardware which would
>> end up being driven by the word OUT.
>> 2. What is your system description:
>> a. Hardware
>> b. Specific OS
>> c. PROBABLY KEY ITEM -- what BIOS
>> Some BIOS's have ability to put some subsystems "to sleep"
>> in order to reduce power consumption.
>>
>> I'm not qualified to answer your question even given that information.
>>
>> *HOWEVER* that information will allow qualified persons to answer your
>> problem. Please note that I differentiate between "problem" and
>> "request". After YEARS in customer support in a different industry, I've
>> learned that they are not always the same ;)
>>
>
> When I go to "Display Properties" "Screen Saver" and select Power, I can select
> the time of inactivity before the OS turns off the monitor. When I type something
> or move the mouse the monitor is turned back on.
>
> I would like my program to turn off the monitor in the same way.
>
>
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
;
Bruno
----------------------------------------------------------------------
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 - 00:22:33 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.