I am using this code to power down my monitor on xp without sp2
const int MONITOR_ON = -1;
const int MONITOR_OFF = 2;
const int WM_SYSCOMMAND = 0x0112;
const int SC_MONITORPOWER = 0xF170;
const UInt32 ES_CONTINUOUS = 0x80000000;
System.Threading.Thread.Sleep(2000);
PostMessage(GetDesktopWindow(), WM_SYSCOMMAND, SC_MONITORPOWER, ScreenValue);
System.Threading.Thread.Sleep(2000);
when i upgrade computer to sp2 this doesn´t work can anybody help me
Best regards Hlynur
const int MONITOR_ON = -1;
const int MONITOR_OFF = 2;
const int WM_SYSCOMMAND = 0x0112;
const int SC_MONITORPOWER = 0xF170;
const UInt32 ES_CONTINUOUS = 0x80000000;
System.Threading.Thread.Sleep(2000);
PostMessage(GetDesktopWindow(), WM_SYSCOMMAND, SC_MONITORPOWER, ScreenValue);
System.Threading.Thread.Sleep(2000);
when i upgrade computer to sp2 this doesn´t work can anybody help me
Best regards Hlynur