Monday, May 16, 2022
  • Home

Vista: Glass in C#

July 11th, 2006 by kenlin@HK [MVP]

Found some good article from chatting with Some other MS MVPs in developer. I found this very good artcle which I would like to be share with you if you wanna try.


We looked at glass in Vista previously so please read that to make sure we are on the same page and using the same terminology… I’ll wait…

Great, now that you are back, let’s see how to get glass in our C# applications. For starters, if glass is supported and enabled on the user’s PC, then your non-client area will by default get the glass effect. In other words, the titlebar and borders will have glass (nothing more for you to do). The question is how to extend that into the client area like other OS applications do (as we saw last time).

There are 3+1 things we need to do:
1. Check that it is supported before proceeding further.
2. Extend the frame into the client area.
3. Paint the extended area black.

4. Allow the user to drag our window by pressing in the glass area as if they were pressing on the window’s caption bar.

(you may view the full story in


Download a complete sample here.

Posted in .NET Framework, Windows Vista | 2 Comments »

This entry was posted on Tuesday, July 11th, 2006 at 6:08 am and is filed under .NET Framework, Windows Vista. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

2 Responses

  1. Daniel Moth Says:

    Thank you for finding my article useful.

    Please respect the internet code of conduct and at least provide at the top and bottom, the source of the article (i.e. my URL) and actually, just a link and possibly a snippet is enough. Reproducing the entire thing verbatim fragments readership and makes consistent updates harder.

    Thanks again.
    Daniel Moth

  2. kenlin@HK [MVP] Says:

    Dear Daniel Moth,
    I am sorry and I have correct it, now it is showing only part of it and the rest should be go forward to your page and view it. Thanks.