zwracam moje monitory i wyłączać za pomocą następującego kodu:SendMessage/SC_MONITORPOWER nie włączy monitor na podczas uruchamiania systemu Windows 8
[DllImport("user32.dll")]
static extern IntPtr SendMessage(IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam);
private const int WM_SYSCOMMAND = 0x0112;
private const int SC_MONITORPOWER = 0xF170;
private const int MonitorTurnOn = -1;
private const int MonitorShutoff = 2;
//Turn them off
SendMessage(f.Handle, WM_SYSCOMMAND, (IntPtr)SC_MONITORPOWER, (IntPtr)MonitorShutoff);
//Turn them on
SendMessage(f.Handle, WM_SYSCOMMAND, (IntPtr)SC_MONITORPOWER, (IntPtr)MonitorTurnOn);
ten używany do pracy zgodnie z przeznaczeniem, ale po zainstalowaniu Windows 8 (I assume this is the reason, since I see others have the same issue) włączenie ekranu nie będzie działać. Nadal mogę go wyłączyć, ale niezależnie od tego, ile razy uruchomię SendMessage() z MonitorTurnOn, nadal muszę przesunąć mysz lub nacisnąć klawisz, aby ponownie włączyć monitory.
Wszelkie sugestie, jak to zrobić w systemie Windows 8?
Czy możliwe jest wyłączenie tylko określonego monitora? – Dor
Nie tak daleko, jak wiem. –