box of grey
May 23, 2006 10:03 PM   Subscribe

is there any way to grey out the background on modal popup boxes (in windows xp) like the "shut down" box automagically does?

when you go to shutdown, under the start menu, the popup box that asks you whether you want to shut down, standby, etc remains in bright color while the background slowly desaturates. i want that with all modal boxes, if possible. [or at least to slightly make the background transparent; at least differentiating it somehow]. how do i do it?
posted by yonation to Computers & Internet (9 answers total)
 
Why do you want to do that? At the moment, a desaturating background has one specific meaning: this computer is preparing to end the current session. What's your reasoning for hijacking and/or diluting this UI cue?
posted by flabdablet at 10:11 PM on May 23, 2006


"Why do you want to do that..."

That is a really helpful answer.

hijack of my own...

How do you make the display black and white all the time?
posted by 517 at 10:15 PM on May 23, 2006


1. Capture the screen to a bitmap
2. Draw it in a rootless window on top of everything (think of a screensaver)
3. Fade out its saturation in a loop
4. Instantiate your modal box atop the bitmap
posted by Mr. Six at 10:30 PM on May 23, 2006


The general answer is you:

1. Capture the screen
2. Create a full screen window showing the picture you captured, modified as desired
3. Put a modal dialog box on top.

The actual desaturation is probably something like:

R = (R+G+B) * 0.333 * n + R * (1-n)
G = (R+G+B) * 0.333 * n + G * (1-n)
B = (R+G+B) * 0.333 * n + B * (1-n)

Where N is how desaturated you want to get (n = 0 is unchanged, n = 1 is totally grey.)

This guy seems to be doing something in the same neighborhood (without the modal dialog on top,) using C# or .NET or whatever the kids are calling it nowadays.
posted by blenderfish at 10:34 PM on May 23, 2006


How do you make the display black and white all the time?

That definitely can't be done (other then by hacking the video driver, or maybe doing something with ICM). Each window draws itself whenever it wants however it wants, directly onto the screen. There's no way to trick a windows application into drawing onto any other surface.
posted by delmoi at 11:50 PM on May 23, 2006


Each window draws itself whenever it wants however it wants, directly onto the screen. There's no way to trick a windows application into drawing onto any other surface.

Traditionally, Windows apps go through the GDI, or "Graphics Device Interface," API, which is a set of functions used to draw to a generalized device (display, or sometimes a printer.) The apps (almost always games) which interact "directly" with the video hardware (in the sense of being able to copy memory to the card via a mapped-in region of RAM) use the aptly-named "Direct X" APIs to do so. (Note that even with DirectX, you're pretty much never directly rendering to the screen.)

It would certainly be possible to intercept GDI calls-- this is what Terminal Services and some versions of VNC do to provide remote access. In fact, come to think of it, if you absolutely had to have a black and white screen, hacking up some kind of two-PC solution using a modified version of VNC may be your easiest bet.
posted by blenderfish at 12:58 AM on May 24, 2006


I hope this is for a proprietary kiosk or something, and not a normal windows app. I'd be pissed if a normal program did this.
posted by knave at 1:35 AM on May 24, 2006


Response by poster: ok, sorry all, i did not make myself clear... i want to do it not in programming (although thanks for the suggestions) but just as a plug-in for WindowsXP, so when popups came up often (as they do) the rest of the screen would desaturate to call attention. So, I want this GUI-wise, not programming-wise; any suggestions?
posted by yonation at 7:47 AM on May 24, 2006


Wait...are you doing this to help the people who are riddled by popups, or to annoy them more...I'm still confused.
posted by josh.ev9 at 10:01 AM on May 24, 2006


« Older mystery painting   |   Crop images using the shell? Newer »
This thread is closed to new comments.