Turn off the monitor // turn it off:SendMessage(Application.Handle, WM_SYSCOMMAND, SC_MONITORPOWER, 0);// turn it on again:SendMessage(Application.Handle, WM_SYSCOMMAND, SC_MONITORPOWER, -1);
多谢了。SC_MONITORPOWERSets the state of the display. This command supports devices that have power-saving features, such as a battery-powered personal computer. The lParam parameter can have the following values:1 - the display is going to low power 2 - the display is being shut off
// turn it off:SendMessage(Application.Handle, WM_SYSCOMMAND, SC_MONITORPOWER, 0);// turn it on again:SendMessage(Application.Handle, WM_SYSCOMMAND, SC_MONITORPOWER, -1);
The lParam parameter can have the following values:1 - the display is going to low power
2 - the display is being shut off