Created
June 6, 2023 06:36
-
-
Save jarulsamy/1bbdb4a277161e6a4098320ba981be7f to your computer and use it in GitHub Desktop.
Turn off display in windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <windows.h> | |
int main() | |
{ | |
SendMessage(HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, 2); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment