Carbon Dudeoxide
04-14-2009, 10:49 AM
With a little help from RalphSpencer over at ComputerHope, I have created a small application in C++ that will turn off your computer's monitor.
To wake it up, simply move your mouse or press a key on your keyboard.
C++ Source Code:
#include <windows.h>
int main(void)
{
SendMessage(HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, (LPARAM) 2);
return 0;
}
I made this so that I can save power on my laptop when not using it at school.
Hopefully this will benefit others.
I haven't experienced any bugs with it, but if any of you notice something strange, please let me know.
To wake it up, simply move your mouse or press a key on your keyboard.
C++ Source Code:
#include <windows.h>
int main(void)
{
SendMessage(HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, (LPARAM) 2);
return 0;
}
I made this so that I can save power on my laptop when not using it at school.
Hopefully this will benefit others.
I haven't experienced any bugs with it, but if any of you notice something strange, please let me know.