How do I make a window remain visible even when the user selects Show Desktop?

Raymond Chen

Raymond

A customer had this question:

I’d like to know how to get a window to remain visible, even when the user has selected Show Desktop. Right now, when the user picks Show Desktop, the desktop appears and covers my window.

Um, yeah, because that’s the whole point of Show Desktop: To show the desktop and get rid of all those windows that are in the way. Windows like yours.
We’re sorry that Windows was unprepared for a program as awesome as yours, because there’s no way to mark your window as even if the user says to show the desktop instead of this window, override the user’s command and show the window anyway. (They’re probably angling for a nice bonus.)
As a consolation prize, you can create a desktop gadget. Desktop gadgets are part of the desktop and raise with it. It so happens that upon further discussion, the customer was trying to write a clock-type program—this is something very well-suited to gadgetification.
A different customer had a related question, but disguised it behind another question:

I noticed that desktop gadgets remain on the desktop even if the user clicks Show Desktop. How does that work? How do gadget stay in front of the desktop when it is shown? What is the trick?

This was a rather odd question to come through the customer channel. And it probably wasn’t just idle curiosity. You don’t burn a support request for idle curiosity.

(While it’s probably true that you don’t burn a support request just for idle curiosity, I’ve seen support requests turn into idle curiosity. Once the customers got the answer to their question, they realized that since they had already burned a support request, they may as well pile on with follow-up questions that are just idle curiosity. That was not the case here, because the customer led with the question.)

The “trick” is that gadgets and the desktop know about each other, so when the user clicks Show Desktop, the desktop covers up all the windows on the screen and then takes the gadgets and places them on the desktop.

The customer’s question is rather odd, because they ask “The system works like X. Are there any tricks for X?” The answer is the rather tautological “The trick for how the system works like X is that the system was designed to do X.”

I suspect that the customer has a secret agenda they are unwilling to share. My guess is that their secret agenda is that they want to write a program that is exempt from being covered by the desktop when the user clicks Show Desktop, and they think they can do it by emulating whatever it is that gadgets do.

The customer liaison confirmed that that’s what the customer is actually trying to do, but that the customer was being coy with the liaison as well and did not explain what the problem scenario was that made them think that they needed a program that is exempt from being covered by the desktop when the user clicks Show Desktop. The customer liaison went back to the customer with the explanation that the way to get the special gadget behavior is to be a gadget, and if they want to pursue it, then writing a gadget is what they need to do.

Raymond Chen
Raymond Chen

Follow Raymond   

0 comments

Comments are closed.