<p>I have an iMac, and I want to be able to turn off the monitor when I go to sleep,.  Alas, the iMac has no switch for this.  I do not want to put the iMac into sleep mode, i want to write a "expose" like application or service, which when the mouse is put into the upper left hand corner of my screen, the display will sleep.  Likewise, if i move the mouse away, it comes back.</p>

<p>Does anyone have experience with tracking mouse movements within the Windows and Display APIs I'd need to look up.  I just need some direction to get started.</p>

<p>Cheers!
Chris</p>

<hr>

<p>I've been asked to clarrify. Sorry if i'm confusing anyone.  I'm running Windows Vista 32 via Bootcamp.  I like that Mac OSX has a "hot corners" feature via Expose.  I have noticed that besides power managment which runs on a time metric, there is no way to sleep the display at will in Vista.</p>

<p>I would like to write my own tool for this.  I might be a glutton for punishment, but i'm a coder, and it's a good excuse to learn something new.</p>

[{'answer_id': 69938, 'author': 'Chris Kimpton', 'author_id': 48310, 'author_profile': 'https://Stackoverflow.com/users/48310', 'pm_score': 0, 'selected': False, 'text': '<p>Not really the answer you seem to be looking for, but cant you do this via the power save option and/or the screen saver - can it be set to nothing.</p>\n'}, {'answer_id': 69942, 'author': 'Jared Updike', 'author_id': 2543, 'author_profile': 'https://Stackoverflow.com/users/2543', 'pm_score': 2, 'selected': False, 'text': '<p>In Leopard, you can just go to "System Preferences" and "Desktop &amp; Screensaver". Click the Screensaver tab, click "Hot Corners", selected the corner you want to change, then chose "Sleep display". Does that not work?</p>\n'}, {'answer_id': 70115, 'author': 'David Sykes', 'author_id': 259, 'author_profile': 'https://Stackoverflow.com/users/259', 'pm_score': 0, 'selected': False, 'text': '<p>Can you not use the monitor power button?</p>\n'}, {'answer_id': 70561, 'author': 'Douglas Leeder', 'author_id': 3978, 'author_profile': 'https://Stackoverflow.com/users/3978', 'pm_score': 1, 'selected': False, 'text': "<p>If it's an old CRT iMac then you can't switch off the screen without switching the computer off - the convection from the CRT is used to cool the processor!</p>\n"}, {'answer_id': 88497, 'author': 'Jared Updike', 'author_id': 2543, 'author_profile': 'https://Stackoverflow.com/users/2543', 'pm_score': 0, 'selected': False, 'text': '<p>Thanks for the clarification, Chris. I would reiterate:</p>\n\n<ol>\n<li>just use a pre-existing solution like this: <a href="http://www.southbaypc.com/HotCorners/" rel="nofollow noreferrer">http://www.southbaypc.com/HotCorners/</a> (untested anything that does the same thing would work). If it allows you to run your pre-selected screensaver, then all you need to do is ...</li>\n<li>... make an exe that does what you want (sleep the screen) and then rename it whatever.scr <a href="http://computer.howstuffworks.com/screensaver.htm/printable" rel="nofollow noreferrer">http://computer.howstuffworks.com/screensaver.htm/printable</a> Do you have this working yet?</li>\n<li>Once you get that working (and you can enjoy a Windows version of your desired OS X hot corners functionality) <em>then</em> worry about how hot corners are implemented. Your Win32 API question is still a good question but like you said you sound like you want to build it yourself. If that is the case, I would post a new question "Hot corners in Windows Win32 API Low level mouse tracking" or something to that effect and just ask: "how do these Hot Corners programs detect hot corner mouse-over events?" By the way my brother used the low level API to move the mouse cursor and simulate clicks so I know what you\'re asking is probably possible. It\'s just that your REAL question seems barried in all this discussion.</li>\n</ol>\n'}]
['https://Stackoverflow.com/questions/69926', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/-1/']