SendMessage(hwnd, WM_SYSCOMMAND, SC_MONITORPOWER, 2);
WM_SYSCOMMAND 意为“窗口消息_系统指令”
SC_MONITORPOWER 意为“系统指令_显示器电源”
-1 (the display is powering on) 打开显示器
1 (the display is going to low power) 低电状态
2 (the display is being shut off) 关闭显示器
SendMessage((HWND)65535, WM_SYSCOMMAND, SC_MONITORPOWER, 2);
目标窗口句柄貌似有一个范围可以随意填..
我试过好几次都可以达到目的.