Ever since moving one of my machines to Windows 8 the SC_MONITORPOWER command is not able to wake up the monitor. It works fine when turning it off it will just not wake it up. I searched a bit and found that several people were having the same problem with Windows 8 so I have been looking for a different way of doing it. I found some information on using mouseclicks, but I have found it unreliable. Today I decided to try looking again and I found someone mentioning using mouse movement with MOUSEEVENTF_MOVE, but I'm unable to get it to work. I was hoping that someone with a bit more programing skills would be able to help get this in a format that will with work the script connector.
The example code they show is:
[DllImport("user32.dll")]
static extern void mouse_event(Int32 dwFlags, Int32 dx, Int32 dy, Int32 dwData, UIntPtr dwExtraInfo);
private const int MOUSEEVENTF_MOVE = 0x0001;
private void Wake(){
mouse_event(MOUSEEVENTF_MOVE, 0, 1, 0, UIntPtr.Zero);
Sleep(40);
mouse_event(MOUSEEVENTF_MOVE, 0, -1, 0, UIntPtr.Zero);
}
And I pulled this from someone talking about it here:
http://stackoverflow.com/questions/1...ning-windows-8
Any help would be appreciated.
Thanks,
Jeff
The example code they show is:
[DllImport("user32.dll")]
static extern void mouse_event(Int32 dwFlags, Int32 dx, Int32 dy, Int32 dwData, UIntPtr dwExtraInfo);
private const int MOUSEEVENTF_MOVE = 0x0001;
private void Wake(){
mouse_event(MOUSEEVENTF_MOVE, 0, 1, 0, UIntPtr.Zero);
Sleep(40);
mouse_event(MOUSEEVENTF_MOVE, 0, -1, 0, UIntPtr.Zero);
}
And I pulled this from someone talking about it here:
http://stackoverflow.com/questions/1...ning-windows-8
Any help would be appreciated.
Thanks,
Jeff
Comment