Windows 7 Development: Aero Effects in .NET Applications

by Prashant 28. February 2010 22:22

With the launch of Windows Vista, Microsoft introduces brand new UI, eye-catching aero effects (glass effects) for their new Operating System. I have seen a lot of programmers who are much concerned about the looks of their applications. So this time with the launch of Windows 7, Microsoft provides the Windows 7 API Code Pack. The Windows 7 API Code Pack not only just allows incorporating the aero glass effect, but many other features which will let you to work more conveniently with Windows 7. I will cover more of the features of Windows 7 API in my later posts. So, I am starting with a first tutorial on how to enable aero effects for the applications running on Windows 7. Create a new windows form application in Visual Studio. Design the form as normally you do as per your requirements. Now to give your form aero glass effect, we first need to add reference for the Windows API. Windows API provides a class called “GlassForm” which we are going to use in this example. When you add a new form to your project you see the following line in your code window:

public partial class AeroForm : Form

When you execute the code you will see a normal windows form which is obviously not we wanted. Here the “GlassForm” class comes into play. As we know we have all are forms are partial class, we have to inherit it with Form class which in turn completes our form. Now instead of using Form class use the “GlassForm” and you will see the Aero Glass Effects on your form.

public partial class AeroForm : GlassForm

This is how you normal Windows form looks like:

And your Aero form look like this:

Download: WindowsAero.zip (790.00 kb)

If you enjoyed this post, make sure you subscribe to my RSS feed!

Share or Bookmark this post…
  • Live
  • Facebook
  • TwitThis
  • del.icio.us
  • Digg
  • DZone
  • Technorati
  • StumbleUpon
  • Google
  • E-Mail

Tags: , , ,

API | C# | Windows 7

Comments

3/1/2010 7:36:59 AM #

trackback

Windows 7 Development: Aero Effects in .NET Applications

Thank you for submitting this cool story - Trackback from DotNetShoutout

DotNetShoutout |

3/1/2010 7:37:21 AM #

trackback

Windows 7 Development: Aero Effects In .NET Applications

You've been kicked (a good thing) - Trackback from DotNetKicks.com

DotNetKicks.com |

3/1/2010 9:56:51 AM #

pingback

Pingback from noneed.info

noneed.info  » Blog Archive   » {Midnight Programmer} | Windows 7 Development: Aero Effects in …

noneed.info |

3/1/2010 12:07:26 PM #

pingback

Pingback from stiri-it.hi2.ro

{Midnight Programmer} | Windows 7 Development: Aero Effects in … : News IT

stiri-it.hi2.ro |

3/1/2010 2:34:54 PM #

pingback

Pingback from autoblog.power.in.ua

{Midnight Programmer} | Windows 7 Development: Aero Effects in …

autoblog.power.in.ua |

Comments are closed

Powered by BlogEngine.NET 1.5.0.7
Visit blogadda.com to discover Indian blogs

Who am I?

Name of authorMy name is Prashant Khandelwal. I am a .NET programmer and technology enthusiast from New Delhi, India.

       

Tag Cloud

This will be shown to users with no Flash or Javascript.

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.
© Copyright 2010

Creative Commons License