Windows Vista: Get the glass effect in your C# applications

Sign in to queue

Description

Author:
Hi, I am Daniel Moth Big Smile
 
Intro:
Windows Vista has a new aero theme that includes what we call the glass effect (powered by the Desktop Windows Manager).

While the non-client area of all windows get glass for free, extending glass into the client area is something you have to work for, as a developer.

In this screencast, I show you how to achieve that with C# in Visual Studio.

Enjoy!

Contents:
30 seconds Intro slide
     - 10'       Paint it black
10'- 14'       Blur the middle
14'- 17'       TransparencyKey
30 seconds Closing slide

Video quality:
In order to keep the video size at 800x600, <20MB and also without cutting too much content, the quality of the glass effect is not shown in its true glory. However, the core goal of showing you the code is scored Wink

Get the code:
I have similar samples to what I demo in the video on my blog here, here and here.

Embed

Download

Download this episode

The Discussion

  • User profile image
    John Galt
    Warning: If you use the transparency key, your application will not be visible in Breeze or Goto Meeting presentations to name just two, most of the meeting companies other than LiveMeeting use transparency for other purposes and cause issues with transparent windows.
  • User profile image
    Daniel Moth
    Thanks for your comment John.
  • User profile image
    Daniel Moth
    Please note that the TransparencyKey approach does not work on the final version of Vista. Ignore those 3 minutes.
  • User profile image
    SbDotNet
    Hi! Daniel, do you know how we can get the glass effect on vb.net (vb2008). I was searching all over but couldnt get for vb. every one talking for c#, is it mean we can get these glass effect only in c#?
    Thank you,
  • User profile image
    Daniel Moth

    Hi SbDotNet

     

    Please try a converter:

    http://www.bing.com/search?q=c%23+converter+VB.NET

     

    Cheers

    Daniel

  • User profile image
    Oto Kiralama

    Thanks..

  • User profile image
    qasim

    Thanks mate.
    was searching for this since a long time

  • User profile image
    Bruce

    @Daniel Moth:
    Daniel, could you please help me here. You state that the transparency key approach no longer works with Vista (I thought I'd cracked it there for a moment).  I'm trying to put ordinary controls like TextBox's or ComboBox's onto the extended glass area and of course it doesn't display the text properly.  How do you solve this problem simply.

  • User profile image
    Bruce

    @Daniel Moth:
    Daniel, could you please help me here. You state that the transparency key approach no longer works with Vista (I thought I'd cracked it there for a moment).  I'm trying to put ordinary controls like TextBox's or ComboBox's onto the extended glass area and of course it doesn't display the text properly.  How do you solve this problem simply.

Add Your 2 Cents