views:

79

answers:

1

I'm turning off the monitor using SendMessage(HWND_BROUADCART, WM_SYSCOMMAND, SC_MONITORRPOWER, 2).

That works, but the monitor turns back on when someone touches the keyboard or mouse. I tried to get rid of this using the DevicePowerSetDeviceState function with DEVICEPOWER_CLEAR_WAKEENABLED for the keyboard and mouse: it returns no error, but has no effect either.

How can I prevent the monitor from powering back on in Vista and Windows7?

+1  A: 

Connect all monitors to the same outlet (or two, three, ... outlets if you have many monitors) and put a power switch on the teacher's desk.

Not all problems should be solved by software.

Patrick
+1: The problem will be definitily solved when the power surge induced by the multiple physical on/off will break all the monitors :P
ereOn
Good point, but there is probably a good solution for that. Isn't there a www.currentoverflow.com site or something similar :-)
Patrick