I have a border, i want the background of this border to be partially transparent (opacity 0.8) but i do not want the image behind it to be well defined. The effect i am after is similar to the Windows Vista window border effect, where you can see that something is behind it but you cant tell what it is.
A few clarifications:
I am working on Windows XP, so i cant use Vista Glass
I need this solution to be portable across any windows platform
Any help would be appreciated :)
Extend Glass Frame Into a WPF Application
WPF Window with aero glass background. (C# .NET)
DWM Blur Behind Overview
Hope one of those links helps. I used the 1'st link I had to add this class to make it work:
#region WINAPI Crap, none should handle this in 21st century
private class NonClientRegionAPI
{
[StructLayout(LayoutKind.Sequential)]
public struct MARGINS
{
public int cxLeftWidth; // width of left border that retains its size
public int cxRightWidth; // width of right border that retains its size
public int cyTopHeight; // height of top border that retains its size
public int cyBottomHeight; // height of bottom border that retains its size
};
[DllImport("DwmApi.dll")]
public static extern int DwmExtendFrameIntoClientArea(
IntPtr hwnd,
ref MARGINS pMarInset);
}
#endregion
This is the best I could find on the net:
http://blogs.msdn.com/unnir/archive/2006/03/01/541154.aspx
Considering the above is by a Microsoft guy, you'd be hard pressed to find a better way to do it.
It does a simple transparency on the window, so not quite like Aero glass. Aero effect is hardware accelerated and most certainly uses Direct3D in some way.
This SO answer talks about it in some detail:
Is it possible to achieve the "Aero Glass" look on XP?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With