in C#
"[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
static extern EXECUTION_STATE SetThreadExecutionState(EXECUTION_STATE esFlags);
void AllowMonitorPowerdown()
{
SetThreadExecutionState(EXECUTION_STATE.ES_CONTINU OUS);
}
void PreventMonitorPowerdown()
{
SetThreadExecutionState(EXECUTION_STATE.ES_DISPLAY _REQUIRED);
}
private void Monitorinstandbysetzen()
{
SetMonitorInState(MonitorState.MonitorStateOff);
}
private void SetMonitorInState(MonitorState state)
{
SendMessage(0xFFFF, 0x112, 0xF170, (int)state);
}"
=============
Sollte in anderen Programmiersprachen auch funktionieren.
VG
Sven