开发者

How to use Aero glass glow effect for non-text

开发者 https://www.devze.com 2023-03-15 15:43 出处:网络
I am making a program that makes extensive use of the Aero glass features of Windows Vista/7. I render text on glass using DrawThemeTextEx and setting iGlowSize appropriately. However, having the glow

I am making a program that makes extensive use of the Aero glass features of Windows Vista/7. I render text on glass using DrawThemeTextEx and setting iGlowSize appropriately. However, having the glow effect on text makes other elements like pictures and buttons look "plain". I would like these to have the same glow effect. The issue is that the pictures are dynamic, not always the same size, etc.

One technique is the method I would use in websites, having 6 images (one for each corner and one for up/down and left/right) and stitch together a complete border. Howev开发者_运维技巧er, I wish to make the glow size customizable, so this technique won't work either.

So the two possibilities I see are:

  • Using a built-in method like DrawThemeTextEx to draw the appropriate glow. If so, then what method can I use?
  • Draw a glow-border myself using Graphics. If this is the only choice, how can I make a glow similar to the one used for text?

Some other notes: This is in C# using Forms (not WPF). I do not mind using P/Invoke.

0

精彩评论

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