TechEd-Dev07: Day 4/1: Windows Vista for Managed Developers: Beyond .NET 3.0

By Alex Duggleby

 

Starting off the session by commiting to C# and calling C++ Coders Masuchists certainly points with me :) Session was held by Daniel Moth.

He covered topics much better than the session “Targeting Key Native Application Program Interfaces (APIs) from Managed Code” which was interesting but could have been shortened to 15 minutes telling us that the Windows SDK sample is available and show what it does.

Ok, first off: yes, once again we will be using a lot of PInvoke to get the neat stuff. But what’s different to the other session is that this one is not wrapped yet. (So I actually have to know how to use it.)

Glass: the new see-through windows in Vista. Uses PInvoke to dwmapi.dll and two methods: DwmIsCompositionEnabled (Is Glass enabled at all?) and DwmExtendFramIntoClientArea (enable the glass). Pretty simple if you ask me, you need a few hacks (for example you have to paint the glass area of the form black to change alpha channel to 0 and you have to have special handling for form moving.) There are even tricks to create glass windows in the middle of the form. As a side note in WPF you still have to PInvoke to get glass, even though the controls are dropped more easily on the glass area.

Task Dialog: “Messagebox on Steroids” Have you ever wanted to extend the messagebox with your own controls. Well now you can. These are wrapped in the Windows SDK (Vista Bridge).

Power Aware: You can react to power state changes in your app.

WinQual: You all know when apps crash you get the possibility to send error reports. You can use this in your own applications and do all sorts of neat stuff (like a recovery method that is called if your app is hanging, or restarting automatically including passing a string parameter to the restarted app.) WinQual is free, so you should be able to use it for your own applications as a central error reporting tool. Haven’t checked that yet. (You need a credit card to register, but a lot of the services are free, and you need a VeriSign certificate.)

The last bit was on Gadgets, but since I’ve had some experience with that I decided to leave and get my battery charged *G* A big minus point (from my perspective) is that there are now power strips in the sessions.

BTW: See the blog for the source.

Tags:

Leave a Reply