Have you ever been giving a presentation, or watching a movie, or showing someone some photos on your laptop, and you have to keep moving the mouse because the screen keeps blanking out?
Here's a quick little Windows XP/Vista tray application that I made to disable the screensaver and standby modes.
It's actually quite hard to implement these things. No wonder VLC media player gets it wrong (and allows screen blanking during video playback).
Here are the things that I handled:
- You enable a screensaver while Standby Preventer is working. The screensaver remains disabled until you allow standby again.
- You have a configuration that allows screen blanking only when computer is on battery power (or only AC, etc). In this case, when you switch from AC to battery power, Windows does not inform applications that screen blanking has been enabled via the normal method. Standby Preventer correctly handles this.
A naive implementation might ignore the fact that the user could change their power settings (eg. disable the screensaver or screen blanking), and overwrite these settings with stored ones when allowing standby again. Standby Preventer goes through great pains to handle this.
There doesn't appear to be any free way to create MS conformant Windows Icon files. Icons are special image files that contain several sizes of the same image. Visual Studio 6.0 was that last version of the official development environment that had the ability to do it [in its resource editor], and that was released 8 years ago. Apparently, Photoshop can do it. Gimp cannot. I used Gimp, which is why my icon files contain only a 16x16 image, and probably look like crap in Vista.
Bye bye, Windows 95
As a side note, this is the first application that I have ever made that doesn't run on Windows 95. I just didn't bother for this one, although it would be trivial.
Want more programming tech talk?
Add to Circles on Google Plus
Subscribe to posts