Users can turn off their laptop displays without putting the device to sleep using several methods on Windows:
1.
PowerShell Command: A specific command can be entered in PowerShell to turn off the display instantly. The command is:
Add-Type -MemberDefinition '[DllImport("user32.dll")] public static extern int SendMessage(IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam);' -Name Monitor -Namespace User32[User32.Monitor]::SendMessage([IntPtr]0xffff, 0x112, [IntPtr]0xF170, [IntPtr]2)
2.
Power Button Configuration: Users can set the power button to turn off the display by going to "Choose what the power button does" in the power plan settings and selecting "Turn off the display."
3.
Desktop Shortcut: A desktop shortcut can be created to turn off the display using the command:
powershell.exe -Command "(Add-Type '[DllImport("user32.dll")]public static extern int SendMessage(int hWnd,int hMsg,int wParam,int lParam);' -Name a -Pas)::SendMessage(-1,0x0112,0xF170,2)"
4.
Keyboard Shortcut: Users can assign a keyboard shortcut to the previously created desktop shortcut by right-clicking on it, selecting Properties, and designating a key combination in the Shortcut key section.
5.
Third-Party Tools: Tools like the ScreenOff App or the Turn Off Monitor tool can also be used to turn off the display. The ScreenOff App is free and open-source, while the Turn Off Monitor tool offers additional features but requires payment for full functionality.