Search code examples
windows-7alertwindows-desktop-gadgets

Is it possible for a Windows 7 Gadget to bring itself to the top?


I am developing a monitor gadget that monitors production exceptions (by making JSONP Ajax requests).

Most of the time the information is not of interest and I wish for it to be behind other windows.

However, when an exception occurs, I would like for the gadget bring itself to the top of other windows to let me know of the problem.

Is this possible, does anyone know? I have a feeling not... is there another way that people can suggest? Or is it that windows gadgets are not really suitable for this sort of thing.

Thanks.


Solution

  • The answer is no.

    However, I have managed to achieve the effect I wanted. Namely I set the gadget to be "always on top" and then have a minimized state that shrinks the gadget down to the smallest it can be and sets the background to an icon (surrounded by transparency). This give me an unobtrusive icon that I can dock into the top right of the screen.

    Then, when an event occurs that I want to display, I have a Maximize() method in JS that restores the width/height of the gadget and shows some content (I actually use jQuery's animate method to do this which gives a nice "expansion", similar to the dock/undock transition).