Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #5382

Re: turn monitor off and on

From Terry Reedy <tjreedy@udel.edu>
Subject Re: turn monitor off and on
Date 2011-05-14 15:58 -0400
References <mailman.1537.1305353327.9059.python-list@python.org> <VYpzp.28137$Vp.6741@newsfe14.iad> <r3qzp.174$cs1.146@newsfe15.iad>
Newsgroups comp.lang.python
Message-ID <mailman.1559.1305403125.9059.python-list@python.org> (permalink)

Show all headers | View raw


On 5/14/2011 3:20 AM, harrismh777 wrote:
> harrismh777 wrote:
>>
>> def turnOnMonitor():
>> SC_MONITORPOWER = 0xF170
>> win32gui.SendMessage(win32con.HWND_BROADCAST,
>> win32con.WM_SYSCOMMAND, SC_MONITORPOWER, -1)
>
>
> I've never tried turning my monitor on/off without using my finger...

The computer cannot turn off the monitor. It can only tell the graphics 
card to turnoff the signal to the monitor. My monitor then displays 'No 
signal detected' in a box and puts itself into a low-power state 
awaiting a signal. Even if the monitor does not do that, a black screen 
should use less power.

Why the turnon does not work, if indeed it does not (and the monitor is 
not failing to respond to its resumption) is not a Python question. 2 
and -1 as off and on parameters is a bit strange. The OP might try a 
different api reference source or ask on a windows innards list.

-- 
Terry Jan Reedy

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

turn monitor off and on Astan Chee <astan.chee@gmail.com> - 2011-05-14 16:08 +1000
  Re: turn monitor off and on harrismh777 <harrismh777@charter.net> - 2011-05-14 02:13 -0500
    Re: turn monitor off and on harrismh777 <harrismh777@charter.net> - 2011-05-14 02:20 -0500
      Re: turn monitor off and on harrismh777 <harrismh777@charter.net> - 2011-05-14 02:29 -0500
        Re: turn monitor off and on Alexander Kapps <alex.kapps@web.de> - 2011-05-14 09:59 +0200
      Re: turn monitor off and on Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-14 07:43 +0000
        Re: turn monitor off and on harrismh777 <harrismh777@charter.net> - 2011-05-14 03:05 -0500
      Re: turn monitor off and on Terry Reedy <tjreedy@udel.edu> - 2011-05-14 15:58 -0400
        Re: turn monitor off and on harrismh777 <harrismh777@charter.net> - 2011-05-14 19:25 -0500
        Re: turn monitor off and on Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-05-16 12:00 +1200
          Re: turn monitor off and on harrismh777 <harrismh777@charter.net> - 2011-05-15 20:48 -0500

csiph-web