Windows 關閉顯示命令


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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM