VB MVP KenLin @HKSAR

Loving Microsoft Technologies.

Vista: Glass in C# (Original post by Daniel Moth)

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.

Optionally,
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 http://www.danielmoth.com/Blog/2006/06/vista-glass-in-c_17.html)

------------------------------------------------------------------------------------------

Download a complete sample here.

Posted: Fri, Jul 14 2006 12:41 by kenlin | with no comments
Filed under: ,