mi rivolgo il mio monitor e disattivare utilizzando il seguente codice:SendMessage/SC_MONITORPOWER non si accende il monitor su ON durante l'esecuzione di 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);
Ciò usata per funzionare come previsto, ma dopo l'installazione di Windows 8 (I assume this is the reason, since I see others have the same issue) accendere lo schermo non funzionerà. Posso ancora spegnerlo, ma non importa quante volte eseguo SendMessage() con MonitorTurnOn, devo ancora spostare il mouse o premere un tasto per riaccendere i monitor.
Qualche suggerimento su come farlo funzionare su Windows 8?
è possibile spegnere solo un monitor specifico? – Dor
Non per quanto ne so. –