WM_SYSCOMMANDlParam:SC_MONITORPOWER Sets the state of the display. This command supports devices that have power-saving features, such as a battery-powered personal computer. lParam can have the following values:1 means the display is going to low power.2 means the display is being shut off. 我试过了,用1不行,2就可以,关了之后,移动一下鼠标就又打开了。
lParam can have the following values:1 means the display is going to low power.2 means the display is being shut off.
我试过了,用1不行,2就可以,关了之后,移动一下鼠标就又打开了。
::PostMessage(::GetDesktopWindow(),WM_SYSCOMMAND,SC_SCREENSAVE,0);