开发者

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

开发者 https://www.devze.com 2023-03-15 14:41 出处:网络
I am developing a monitor gadget that monitors production exceptions (by making JSONP Ajax requests).

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 w开发者_如何学运维indows gadgets are not really suitable for this sort of thing.

Thanks.


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).


Not sure it this is available for gadgets but on Windows machines you can use the Notification area. http://msdn.microsoft.com/en-us/library/aa511448.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消