Mike Taulty's Blog
Bits and Bytes from Microsoft UK

May 2006 - Mike Taulty's Blog

Blogs

Mike Taulty's Blog

Elsewhere

  • Upcoming Windows Vista Webcast Series

    I picked up this set of “Vista” webcasts that are coming up over the next month or so – looks like a pretty good list and includes separate WinFX topics but also a few Vista topics such as Task Scheduler, User Account Control, Installations and Gadgets.
  • Windows Workflow Foundation & Tetris

    This one is purely for fun. When I first started playing with .NET, one of the very first pieces of code that I wrote was a really basic Tetris game using Windows Forms. I’d long since thought that I’d lost this altogether but the other day I had an idea around it and went digging and managed to find some of it but I could only find the executable and not the source code. It was actually MSN Search that found the executable attached to an old email from around 5 years ago. So, I ran the executable through Reflector and using the right plug-in I managed to get some C# code back :-) Once I’d recovered this source, I thought it’d be interesting to see if I could move some of the control flow and logic from the original code into Windows Workflow Foundation and have a Workflow drive the game execution. I’ve put that together – the Workflow ends up looking like this; I tied it up with Windows Forms to provide a UI of sorts and that ends up looking a little like this; Now, there’s...
  • WinFX and Native Code

    We’ve been out doing the UK Microsoft Technical Roadshow and one of the topics that we’re covering is WinFX . Coming to Presentation, Communication, Workflow Foundation(s) for the first time is pretty exciting in terms of how much power you get without writing tonnes of code and I think that’s particularly appealing to the C/C++ developer who you’d expect to have a very good appreciation of exactly how much time he/she is saving by adopting something like WinFX. However, I’ve had a couple of pieces of feedback questioning whether any of the WinFX technologies are even usable from “unmanaged” C/C++ so I thought I’d say a little something about that here. I think if you’ve got an existing C/C++ code base then you’ve got a number of options around how you start to integrate that with WinFX as you take it forward. Firstly, let’s assume that rewriting all of your C/C++ code isn’t an option and you need to re-use large amounts of what you’ve...
  • Reinstalling Vista Beta 2

    Late yesterday I reinstalled Vista Beta 2. It was my easiest install of Vista so far and the quickest install of Windows I’ve ever done. It worked very well and I’m not known for lavishing praise where it’s not due and I have had some problematic Vista installations with the previous CTP’s. I think I’m in agreement with this and not much in agreement with this but your mileage may well vary on different hardware so bear in mind that this is still a beta. I’m installing onto a Toshiba M3 laptop. I ran the ISO, installed to a clean partition and about 30 minutes later I had Vista up and running. I joined the local domain, connected to the wireless networking and everything worked fine. I managed to activate the OS straight away and then went to Windows Update and it automatically found a WDDM driver for my graphics card and a driver for my sound card. I had to switch the colour depth in my graphics settings from 16–bit to 32–bit in order to get “AERO Glass”...
  • IIS Community Site

    Who'd have thought it? A whole site devoted to IIS . Good idea :-)
  • Software.Reload

    A big day for re-installing software for me today with the arrival of WinFX Beta 2, Vista Beta 2 , Office 2007 Beta 2 and May Technical Previews of Expression Interactive Designer and Graphic Designer . Note: I think that you can get all this stuff on DVD if you want to avoid the download pain ( http://www.microsoft.com/betaexperience/engb/ ). My Vista download came down at a sluggish 50KB/sec until this morning when it started to hit 230 or so KB/sec and the whole thing improved. All in all, the process proved relatively painless although I've only moved a small number of my demos across from the Feb CTP and I probably need to move a lot more and there'll be some pain in that. I've not reinstalled Windows Vista yet. I'll be looking to do that maybe later today if I get the opportunity. As an aside, I came across a reasonable article on WPF databinding last night on the Vista developer centre here .
  • Visual TaskTips

    Via Simon and Jonathan , I came across http://www.visualtasktips.com/ and installed it and ran it and it works pretty well. It's similar to what you get with the TaskBar in Vista where you get live previews of windows although in Vista this is done through the DWM (there's an API that you can use) whereas I'm guessing that this example for XP is using something like the PrintWindow API that I used in this sample in order to build a cheap replica of the "rolodex" style functionality hidden behind WINDOWS+TAB in Windows Vista. You can see the difference illuminated if you run a video in Media Player and then try and get a "live thumbnail" of it using Visual TaskTips - it displays a blank image whereas in Vista you'd see that live thumbnail being updated. Nonetheless - it's a cool utility to have as a productivity aid when you have lots of windows running (i.e. always). I've got a small demo kicking around somewhere of getting the DWM to draw you a live thumbnail on Vista (to be honest, it's pretty trivial) so I...
  • Windows Vista and User Account Control

    It seems to me that User Account Control is one of the most noticeable features of Windows Vista when you're first using it but there's a lot of confusion around it. Hopefully I'll not add to it by getting something wrong. Here's my take on what I found with it by default ; 1) When a process runs on Vista it will not have Administrative privileges by default whether you are logged in as Administrator or not. (Almost all) Calls that require Administrative privileges will therefore fail. 2) A process only has Administrative privileges if it is running elevated . 3) When a process runs it is either elevated or not for the duration of its lifetime. It cannot be changed during execution. 4) When a process wants to run elevated it goes through the "consent" dialog box to check with the user. 5) There are a number of ways in which a process can run elevated; i) You use the right mouse menu in the shell to run it "as administrator". ii) It is launched from a process that is already elevated. iii) It has marked itself...
  • Blog Comments Disabled (Again)

    I'm sick of being spammed. Want to contact me? Mail me. Want to reference something here? Link to it from your site. I'm fed up with deleting the mails about medication and so on :-) I have a vague plan to replace this site completely with a simple solution that I write myself rather than trying to host something else that's too complicated. What do I want to build? Simple web service that lets me publish content from a desktop application. No multiple blogs, no multiple authors, no categories. Would be nice if that content RSS feed generated off the data that the web service receives. For non-RSS readers, a WPF XBAP application that offers a richer reading experience than your standard web front end does. Shouldn't be too difficult to put together, just a matter of finding a little time and sorting it out then migrating my existing .Text data across before getting rid of it and its database.
  • All Quiet on the Northern Front

    I've been quiet on this site for a little while - had my head down in various different things and spent most of the last week or so playing with Windows Vista. There's a bunch of stuff that I learnt along the way and I'll try and blog as much as I can remember and I have some other things that I want to get done and get out as well. Normal service will be resumed…in the meantime here's some very random links I've been reading (mostly on User Account Control in Vista); Don Box on C# 3's ability to turn code into data The User Access Control Blog (for Vista) User Account Developer Guide on MSDN AppCompat Shims for Vista UAC
  • Hierarchical Data Binding with WPF

    I had a bit of a play with Hierarchical data binding with the WPF. There are good documents and samples in the SDK but I still struggled initially to fathom it out, I could get it to work ok for XML but then I had to think a bit more for data. The most natural place where this comes into play is when you want to bind a TreeView to either some XML or maybe an object source. I ended up building a little RSS viewer (consuming the RSS API in IE7 again) that uses the recursive nature of the Folders that the API offers up to see how I could get a WPF TreeView to be databound to a hierarchical data source. The core of binding the TreeView to my object hierarchy which exposes Folder->Folders->Feeds->Items is to use declarative binding which looks like; <ObjectDataProvider x:Key="FolderDS" d:IsDataSource="True" ObjectType="{x:Type RssWrapper:Folder}"/> <HierarchicalDataTemplate DataType="{x:Type RssWrapper:Folder}" ItemsSource="{Binding Feeds}"> <TextBlock Text="{Binding Title}"/> </HierarchicalDataTemplate>...
  • David Chappell On InfoCard

    David Chappell's written a good article (does he write any other kind I wonder? :-)) on InfoCard up at the MSDN . Some days I seem to get InfoCard properly arranged in my head and then other days I seem not to understand it at all. I think where I'm struggling right now is that no-one's illustrating the InfoCard scenario in a complete end-to-end manner showing you how cards are issued through to being used. Microsoft needs to put up a site ( www.infocardshowcase.com ?) showing you (with real code) how this is meant to work.
  • Get the Consolas font for VS 2005 on Windows XP

    Consolas is a really nice font for writing code with. It's already there on Vista but you can get it for Windows XP from here .
  • DeveloperDeveloperDeveloper Day III - Agenda Published

    I missed this by a couple of days as I'm running around a lot at the moment but the agenda for the 3rd Developer Day has gone live on the web site over here . The Developer(DeveloperDeveloper) Day is a Community day hosted on Saturday the 3rd June at the Microsoft Campus down in Reading. From the agenda, it looks like it'll be a great day and there's only a month or so to go to the event itself so register over there to grab a seat.