DWM problem (Vista glass) when setting transparencykey

Please consider the minimum code below. This code creates a simple form with a 100 pixels above margin with vista blur glass effect. (For support purpose, we assume this code will be only executed under Vista)

All works very fine until I set the transparencyKey of this form. If the transparencyKey is set to a non empty value, the blur glass region is painted in black.

My pupose is to "bore a hole" in the form to let see a region of the next application in the z-order.

Thanks in advance for help,

Kind regards,

public partial class Form1 : Form
        MARGINS glassMarges;
        public Form1()
            glassMarges = new MARGINS(0, 0, 100, 0);
            DwmExtendFrameIntoClientArea(this.Handle, ref glassMarges);
        protected override void OnPaint(PaintEventArgs e)
            e.Graphics.FillRectangle(Brushes.Black, Rectangle.FromLTRB(0, 0,this.ClientRectangle.Width, glassMarges.cyTopHeight));
        [DllImport("dwmapi.dll", PreserveSig = false)]
        public static extern void DwmExtendFrameIntoClientArea(IntPtr hWnd, ref MARGINS pMargins);
        public struct MARGINS
            public int cxLeftWidth, cxRightWidth, cyTopHeight, cyBottomHeight;
            public MARGINS(int left, int right, int top, int bottom)
                cxLeftWidth = left; cyTopHeight = top;
                cxRightWidth = right; cyBottomHeight = bottom;

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

guyvaioAuthor Commented:
No answer. Does it mean "no solution" ?
Is really possible that Microsoft has conceived as "incompatible" the transparency and the blur effect in the .net framework ?
Kind regrads,
guyvaioAuthor Commented:
No solution ! Where are the experts ?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.