Hate UML?

Draw sequence diagrams in seconds.

Standby Preventer
Posted on: 2008-11-09 00:16:51
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.

Download StandbyPreventerInstall.exe

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

Post comment

Real Name:
Your Email (Not displayed):

Text only. No HTML. If you write "http:" your message will be ignored.
Choose an edit password if you want to be able to edit or delete your comment later.
Editing Password (Optional):


2009-03-16 05:50:01
Uhh.. what's wrong with the icon editor in later versions of Visual Studio? Works just fine for me...

Steve Hanov

2009-03-16 09:48:09
Chris: I checked Visual Studio Express edition (2005 is what I currently have) and it doesn't have any way to create icons that I can find. I suspect you have to buy the standard edition.


2009-05-18 01:02:55
Thanks a bunch! I got so tired of having to reenable standby after every time I used VLC.


2009-06-16 07:43:05
Great tool!

Quick question: nostandby.exe is also preventing the screen locking mechanism, is this by design? If yes, is there a way to prevent standby, but still allow Windows to lock the screen? Maybe an undocumented feature in application.xml?

This is for security reason. My current workaround is to press [Win]-[L] manually.

Regarding icon creation on Windows, have a look at IcoFX, the most capable freeware I've found for this task.

Joe Frambach

2009-06-30 11:09:27
Holding down the ctrl key does the trick, no tinkering involved. I usually balance the mouse on the corner of the keyboard, just enough to depress ctrl.


2009-11-06 10:08:25
Nice tool. I only have one wish: It should be possible to start it in "prevent standby"-mode. This way it doesn't need to be running all the time, you just start it (e.g. with a keyboard shortcut) in case you are giving a presentation and want to prevent standby.


2010-05-04 11:05:09
i agree with Chris on the "prevent standby" mode enabled on app start. Is there a startup parameter or something like that?

Other posts by Steve

Yes, You Absolutely Might Possibly Need an EIN to Sell Software to the US How Asana Breaks the Rules About Per-Seat Pricing 5 Ways PowToon Made Me Want to Buy Their Software How I run my business selling software to Americans 0, 1, Many, a Zillion Give your Commodore 64 new life with an SD card reader 20 lines of code that will beat A/B testing every time [comic] Appreciation of xkcd comics vs. technical ability VP trees: A data structure for finding stuff fast Why you should go to the Business of Software Conference Next Year Four ways of handling asynchronous operations in node.js Type-checked CoffeeScript with jzbuild Zero load time file formats Finding the top K items in a list efficiently An instant rhyming dictionary for any web site Succinct Data Structures: Cramming 80,000 words into a Javascript file. Throw away the keys: Easy, Minimal Perfect Hashing Why don't web browsers do this? Fun with Colour Difference Compressing dictionaries with a DAWG Fast and Easy Levenshtein distance using a Trie The Curious Complexity of Being Turned On Cross-domain communication the HTML5 way Five essential steps to prepare for your next programming interview Minimal usable Ubuntu with one command Finding awesome developers in programming interviews Compress your JSON with automatic type extraction JZBUILD - An Easy Javascript Build System Pssst! Want to stream your videos to your iPod? "This is stupid. Your program doesn't work," my wife told me The simple and obvious way to walk through a graph Asking users for steps to reproduce bugs, and other dumb ideas Creating portable binaries on Linux Bending over: How to sell your software to large companies Regular Expression Matching can be Ugly and Slow C++: A language for next generation web apps qb.js: An implementation of QBASIC in Javascript Zwibbler: A simple drawing program using Javascript and Canvas You don't need a project/solution to use the VC++ debugger Boring Date (comic) barcamp (comic) How IE <canvas> tag emulation works I didn't know you could mix and match (comic) Sign here (comic) It's a dirty job... (comic) The PenIsland Problem: Text-to-speech for domain names Pitching to VCs #2 (comic) Building a better rhyming dictionary Does Android team with eccentric geeks? (comic) Comment spam defeated at last Pitching to VCs (comic) How QBASIC almost got me killed Blame the extensions (comic) How to run a linux based home web server Microsoft's generosity knows no end for a year (comic) Using the Acer Aspire One as a web server When programmers design web sites (comic) Finding great ideas for your startup Game Theory, Salary Negotiation, and Programmers Coding tips they don't teach you in school When a reporter mangles your elevator pitch Test Driven Development without Tears Drawing Graphs with Physics Free up disk space in Ubuntu Keeping Abreast of Pornographic Research in Computer Science Exploiting perceptual colour difference for edge detection Experiment: Deleting a post from the Internet Is 2009 the year of Linux malware? Email Etiquette How a programmer reads your resume (comic) How wide should you make your web page? Usability Nightmare: Xfce Settings Manager cairo blur image surface Automatically remove wordiness from your writing Why Perforce is more scalable than Git Optimizing Ubuntu to run from a USB key or SD card UMA Questions Answered Make Windows XP look like Ubuntu, with Spinning Cube Effect See sound without drugs Standby Preventer Stock Picking using Python Spoke.com scam Stackoverflow.com Copy a cairo surface to the windows clipboard Simulating freehand drawing with Cairo Free, Raw Stock Data Installing Ubuntu on the Via Artigo Why are all my lines fuzzy in cairo? A simple command line calculator Tool for Creating UML Sequence Diagrams Exploring sound with Wavelets UMA and free long distance UMA's dirty secrets Installing the Latest Debian on an Ancient Laptop Dissecting Adsense HTML/ Javascript/ CSS Pretty Printer Web Comic Aggregator Experiments in making money online How much cash do celebrities make? Draw waveforms and hear them Cell Phones on Airplanes Detecting C++ memory leaks What does your phone number spell? A Rhyming Engine Rules for Effective C++ Cell Phone Secrets