1.關閉顯示器.bat:
powershell (Add-Type '[DllImport(\"user32.dll\")]^public static extern int PostMessage(int hWnd, int hMsg, int wParam, int lParam);' -Name a -Pas)::PostMessage(-1,0x0112,0xF170,2)
2.exe關閉顯示器:
CloseMonitor
https://github.com/xlfdll/CloseMonitor/releases
TurnOffLCD.exe
https://www.redmondpie.com/turn-off-your-notebook-lcd-with-one-click/
https://www.redmondpie.com/downloadscenter/TurnOffLCDv101.zip
3.win+R cmd:
%systemroot%\system32\scrnsave.scr /s
4.C#代碼實現:
https://www.cnblogs.com/crwy/p/9673565.html
https://www.pstips.net/how-to-switch-off-display-with-powershell.html
5.一個多功能工具: NirCmd.exe:
nircmd.exe monitor off ---要帶參數
https://www.nirsoft.net/utils/nircmd-x64.zip
https://www.nirsoft.net/utils/nircmd.html