turn monitor off and on

Jack Krieger jack.krieger at gmail.com
Fri May 20 05:54:43 EDT 2011


> def turnOffMonitor():
>   SC_MONITORPOWER = 0xF170
>   win32gui.SendMessage(win32con.HWND_BROADCAST,
> win32con.WM_SYSCOMMAND, SC_MONITORPOWER, 2)

This code does not return control to you, so programm still locked. In my opinion it due broadcasting message. But I do not know how to send message to monitor directly.



More information about the Python-list mailing list