Answer» With a little help from RalphSpencer, 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:
Code: [Select]#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.
Application is attached to this post, but here is a mirror: http://www.fileupyours.com/files/191176/Monitor%20Off.zip
[ATTACHMENT deleted by admin]We will not be your beta testers! We defy you!!
That's pretty COOL, actually.Lol. I don't consider it a beta. It's too SIMPLE to be a beta.
THANKS. Alpha ? ?And Gamma.
Three types of Radiation.
And besides that diversion, I wouldn't upload anything here unless it was finished and doing what it was supposed to. Installation instructions?1.copy somewhere.
2.run it.
if you call PostMessage instead it won't hang if one of the running programs is hung as well- either that or SendMessageTimeout. See- always room for improvement.
Name and address, please, just incase it messes up my laptop..... what's it going to do?
it broadcasts a message the computer sends anyway when it shuts the monitor off...
Quote it broadcasts a message the computer sends anyway when it shuts the monitor off...
So, like, what? Carbon's not as slick as he thinks he is?
(Just teasing -- I wouldn't have known how to write that.)no, that was in response to kpac, although I guess the means he was joking.
As in, how could it mess up a computer...
I'd post a VB version but it would be longer and really just an attempt to draw attention to myself.
QuoteI'd post a VB version but it would be longer and really just an attempt to draw attention to myself.
OK, Al...
Don't "inconvenience" us, or anything...
Just saying, it does work...very cool...
Quote from: BC_Programmer on April 14, 2009, 01:02:51 PMno, that was in response to kpac, although I guess the means he was joking.
As in, how could it mess up a computer...
I'd post a VB version but it would be longer and really just an attempt to draw attention to myself.
You know what they say...PICTURES...or it didn't happen.my Logitech LX 700 already does that, called Sleep Mode
|