MEDC Europe

Mon, May 7, 2007, 12:59 PM under Events
If you live in Europe and you missed MEDC in Vegas last week, then you have only one week left to register for a great price for the European version, held in Berlin on 25-26 June. I will be repeating my two sessions (share code and GUI tips) and also participating in a panel session.

Details and registration here.

Upcoming Orcas events

Sun, May 6, 2007, 12:03 PM under Events
Me and MikeT will be bringing a joint 2.5 hours of "Orcas" goodness to a free MSDN event near you. For details or to register please click on the links below:
24 May at TVP, AM
29 May in Manchester, AM
5 June in Edinburgh, AM
5 June in Edinburgh, PM

...and don't forget another joint session (23 May) we are doing specifically on LINQ that you can register for at the Fest07 homepage (the day also includes sessions from Rafal Lukawiecki).

Finally, how could I ommit yet another repeat of the popular MSDN Roadshow, delivered by the entire team this time in London (11 June) – register for free here.

Vegas MEDC wrap-up

Sat, May 5, 2007, 12:33 PM under Random
Just came back from a very different MEDC for me this year.

I've been to Vegas a few times before and this is the only time that I didn't venture beyond the Venetian! I pretty much spent all my time at the conference or in my room, with the occasional trip to restaurants (in the Venetian) for breakfast/lunch/dinner. I only had drinks (extremely generous portions of Stoli on the rocks) on Wednesday night at the Venetian's TAO where the conference party was held. Some of us went to some other place in the Venetian after that but I don't recall the name. This resulted in a bad hangover on Thursday morning which soon converted itself to a nasty cold that I brought back with me today. I bet half the attendees came back with a cold because the temperatures in that hotel are sub zero. The other bad news was that since Monday my laptop monitor malfunctioned. It did this last September and it only took the Toshiba technician 10 minutes to reconnect the cable internally but I wasn't going to risk that myself with all the sessions I was doing! I ended up delivering my breakouts by looking at the monitor on the stand rather than my own laptop monitor (external projection still worked, thank God!).

On a more positive note, my breakouts were well received and I enjoyed watching them feature in the Top 10 list monitor in the speaker room :-). This was a special achievement for anyone at MEDC this year since Doug Boling decided to have 4 of his talks dominate the top 5... someone suggested, and I agree, that next year we should only pay him if he gets scores above 8.5 (which is what he did this year!). Thank you to everyone who attended my sessions, thank you to all of you for voting and special thanks to those of you that put up with my bad jokes :-)

On a further positive note, I came back with more cool swag than from any other conference ever: hardware. Some bits I got because I was a speaker, others as a (former) MVP, and others by prior arrangement with Microsoft colleagues in Redmond whom I met in Vegas. Below is the top 5 swag items I have just unpacked:
- Sweet Presenter Mouse
- NETMF Freescale i.MXS Development Kit
- JawBone noise cancelling Bluetooth headset
- Cool laptop web camera
- Windows CE eBox-2300SX Development Kit

Now I'll go find some creative way to keep my eyes open while my body adjusts itself to normal time again...

See you at MIX or MEDC

Fri, April 27, 2007, 10:02 PM under Random
It is going to be busy for me at MEDC again this year (sessions one, two, three and four), but if you are attending MEDC or even MIX (which is also held at the Venetian in Vegas next week), contact me to catch up. I am flying there in a few hours and will stay until next Friday.

When I am back I'll share some good news even though somebody has already spilled the beans. Have fun!

MEDC Session 3 and 4

Fri, April 27, 2007, 07:52 AM under Events
When/where:
Wed, May 2, 15:45 - 17:00, Room: Venetian F
Thu, May 3, 14:00 - 15:15, Room: Venetian F

Title:
APP206 & APP206R - Panel Discussion with .NET Compact Framework Team, OpenNETCF Smart Device Framework Team and Other Industry Insiders

Abstract:
Do you have pressing questions about the .NET Compact Framework? Do you use OpenNETCF's Smart Device Framework and have specific questions? Do you have general questions on Windows Mobile and Windows Embedded CE development? Come to this session where members of the Compact Framework Team, OpenNETCF's Smart Device Framework team and other industry developers will be part of a panel answering questions from general coding to architecting mobile software, even covering .NET Micro Framework.

MEDC Session 2

Fri, April 27, 2007, 07:50 AM under Events
When/where:
Wed, May 2, 11:30 - 12:45, Room: Veronese 2404-05-06

Title:
APP312 - Sharing Assets Between the .NET Compact Framework and the .NET Framework

Abstract:
Whether you were first introduced to .NET via the Compact Framework in Windows Mobile or via the full .NET Framework on the PC, it may make sense to share your code assets between the two platforms. In this session we will explore when you should be doing this and when not. We will then explore the options available (e.g. directly sharing binaries or conditional compilation) and drill into problems and workarounds. This will include framework differences, platform/OS differences, optimal usage of Visual Studio 2005 (and "Orcas") and how things have improved since NETCF v1 and v2 (going towards v3.5).

MEDC Session 1

Fri, April 27, 2007, 07:48 AM under Events
When/where:
Tue, May 1, 15:15 - 16:30, Room: Venetian G

Title:
APP203 - Building Mobile Windows Forms Applications: Tips, Tricks and Guidelines

Abstract:
When managed code first came to devices, there was a lot of excitement because developers finally had the ability to make use of their existing skills and assets from the desktop world, into the Windows Mobile world. The truth is that building GUI applications for Windows Mobile, is not the same as building GUI applications for your PC or laptop. In this demo-driven session, we explore the platform differences between desktop and mobile, and also explain what you must do to address them. In addition to explaining best practises for building mobile applications for mobile users, we look at the UI guidelines for Windows Mobile and map those to the code required for meeting them. You will also gain an understanding of what is required in order to write cross-device code including what Windows Forms controls are best avoided and how to overcome potential .NET Compact Framework limitations.

Programmatically determine if UAC is enabled

Thu, April 26, 2007, 07:38 PM under Windows | Vista | UAC
This is a question I get often:
"How can I determine if User Account Control is on or off via code?"
The answer I always give:
"You are asking the wrong question. Who cares?"
The point being that, regardless of whether the user has turned off UAC or not, your application should still be partitioned and work correctly for both admins and non-admin users. It is irrelevant if UAC is on or off. You should still display the shields, you should still gracefully fail if the user is not an admin (same as you would if the elevation prompt came up and the user cancelled, same as you should if you were running on XP). The academic answer to the original question is that you can read it from the registry (much like the built-in Security Centre does). Since there is no genuine requirement to know this stuff from code, there is no API for it.

So the only question to answer programmatically is how to know if the user has admin rights. I have shown how to do this before but here goes again:
 // using System.Security.Principle;
private bool IsAdmin()
{
WindowsIdentity id = WindowsIdentity.GetCurrent();
WindowsPrincipal p = new WindowsPrincipal(id);

return p.IsInRole("Administrators");
}
I have read blogs where others get further information regarding elevation about the user's account by pinvoking native APIs, but again, I remain totally unconvinced about that need. Your app shouldn't care about anything else: all that matters is if the user has admin rights at the moment your admin code is about to execute, nothing else.

If you disagree and think you have a genuine reason for knowing more than what I describe above, then please post your scenario to the relevant forum linked to from here.

Repaving and how VS Orcas saves me time

Thu, April 26, 2007, 04:09 AM under Orcas | VisualStudio
Recently I repaved my Toshiba M5 starting from scratch (format, Vista RTM, join domain etc). The way this works for me is that I have a secondary drive in the laptop with all my data plus apps (multiple msi files, setup.exe files, iso images etc). I install the OS on the main drive and then continue to install the other applications from the 2nd drive. Looking at my instructions (I've written a simple installation todo.txt file that reminds me of what to do), I used to install the following for my mobile development needs: VS2005, SP1, SP1 Update for Vista, Latest NETCF SP, WM5 PPC SDK, WM5 SP SDK, DE v2. I am sure this isn't the story for device development only, but that every developer has their own set of things they install on top of VS e.g. WF Extensions, WPF/WCF extensions, VSTO SE, AJAX, MOSS SDK etc - overall a dozen or more separate installation packages (separate to install, separate to maintain/keep).

With the advent of Orcas Beta 1, I decided to ditch VS2005 completely and only install Orcas as my sole dev environment (btw, without multitargeting this decision would not be possible). It is only then that I truly realised that I do not need *any* of the above extras/extensions/SDKs since they *all* ship in the box as part of the single installation! :-)

The side benefit of this is that, previously if you had no interest in some technology (e.g. Office development or web development or device development) you probably wouldn't bother installing something separate, but now the story is different: it is just there so you can have a quick play with it whenever you want and ignore it thereafter if you still don't fancy it.

What will YOU install the next time you repave your machine: VS2005 side-by-side with Orcas or just Orcas?

VirtualSideShow

Wed, April 25, 2007, 11:06 AM under Windows | Vista | SideShow
At some point I must find time to continue my series of blog posts on the Windows SideShow technology that ships with Vista. But until then, if you've wanted to play with this stuff but couldn't be bothered to download the Windows SDK (shame on you btw!), now you have the option of downloading the Device Simulator as standalone (and it is a newer version too!). Go get it.