November 2006 Entries

PM and Light Pollution

Here in the UK we have a new gimmick, which is voting for things on the net. The kicker is that the government apparently looks at the votes. I present this to you:  Light pollution is bad for so many reasons. It stops us seeing the beautiful night sky, it affects wildlife, adds to carbon emissions for no benefit and bright lights probably doesn't make us any safer. Now, if you're a British citizen (or resident/expat/in an overseas territory/a Crown dependency/in the UK Armed Forces) you can join a petition against floodlighting of Government buildings on the official 10 Downing Street...

The Mono Migration Analyzer 1.0

The Mono project has released a very interesting tool Jonathan Pobst wrote a very nice tool, the Mono Migration Analyzer (Moma) a tool that can be used by Windows .NET developers to evaluate whether their software will need any modifications to run on the Mono supported platforms... Source: Miguel de Icaza: Mono Migration Analyzer 1.0 Originally published on Mon, 27 Nov 2006 18:43:00 GMT by Miguel_x0020_de_x0020_Icaza@monologue.go-mono.com I of course ran it on our application to see how bad it would come out and I wasn't disappointed: Methods that are still missing in Mono: 247 P/Invokes...

Running Vista

One of the things I did before I installed the RTM version of Vista was to pop out one of the memory sticks from my PC. Why? I wanted to see what it was like at the minimum spec of 512mb. Today I cracked and put the other 512mb back in because it was running far too slow. So kids, 1Gb is the minimum you realistically need for Vista. I'd feel outraged but I've been telling everybody that 1GB should be the minimum spec for PCs that they buy for the last two years or so. Now my processor...

TaskDialog: Beyond the MessageBox

Calling the TaskDialog in Vista a simple MessageBox replacement that has an extra text field does not do it justice, but you do get a helper function to make it just that. In my last post I showed two version of the same dialog, one using a TaskDialog and one using a MessageBox. The code for these is here:TaskDialog(hWnd, hInst, L"Vista Test Application", L"Error opening file \"data.txt\"", L"Access was denied.", TDCBF_OK_BUTTON | TDCBF_CANCEL_BUTTON, TD_INFORMATION_ICON, &buttonPressed); MessageBox(hWnd, L"Error opening file \"data.txt\": Access was denied.", L"Vista Test Application", MB_OKCANCEL|MB_ICONEXCLAMATION); As you can see the two calls are very similar, the only massive diffence being...

Task Dialogs

It's Vista time, and the best way to learn what's new in an operating system is to break out your C compiler (yep, not even a single + in sight) and hit the ground running. I've missed coding WndProcs directly you know, this managed lark is spoiling me. Vista introduces something called the Task Dialog, which is at its basic level a replacement for the humble and venerable MessageBox. He's a picture of it being used in that mode. The first thing I noticed when throwing together the very basic app to try that out was that there...

A Visual Studio setup request

I have a request for the next version of Visual Studios setup. Can we have dynamic selection of what's been set to install while the installation is taking place? I know that sounds a bit strange but I've just managed to forget to unselect the compact framework bits again while installing on a free disk spaced challenged laptop and it would be nice to be able to get rid of them during the very long install. It's either that or I train myself to always expand that c# node and I've failed to manage so far.

Writing your own msbuild tasks

With Visual Studio 2005 and .NET 2 Microsoft added a new build system called MSBuild. It's nothing revolutionary as it's been done before by makefiles, Ant and the like but it's a lot better than the old way for Visual Studio as it means that we can have a bit of flexibility for a change, including adding in new tasks. Take this example build file for instance.<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Target Name="Build"> <Exec Command="DoSomething.exe source.txt 10" /> </Target> </Project> This just runs a program called DoSomething and passes some parameters. We can extend it to use a custom task instead quite easily.<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <UsingTask...

Code check-ins using code under Team Foundation Server

I've recently been working on our release process, and by doing so I found myself needing to check source files out, modify them and then check them back in again from within code in order to update version information. The usual way to have to do these types of operation has always seemed to involve spawning a command line application for each command but TFS has an object model that lets us do all sorts of interesting things.  The code turns out to be shockingly simple, and this example connects to the server and and checks out a file into an...

Fun with .NET 3.0

I've been picking away at making my application work with WPF and so far it's been very simple. I know there's a major landmine waiting for me further down but that's very specific to our application and I've experimented with code to replace that before as part of a debugging exercise. The big problem that I see with WPF at the moment is that the visual studio support is a tad lacking. Actually it's so bad that the visual designer is practically useless and I have to write pure XAML to do everything. This isn't as bad as it...

It's all about the Content

I've been showing various people in the office WPF and generally annoying everybody by being overly enthusiastic and so far the reactions have mostly been positive. The enthusiasm seems to be infectious as you can tell when somebody understands what the new functionality means they can now do. The first exciting thing (well, I think it's exciting) that I'm going to enthuse about is the way that controls display text now. In .NET 1, 2 and just about every other Windows UI framework you set the contents of a control by setting a property such as Text or Image. With...

The future sure looks fun

Now that Vista is finished and .NET 3 is released I'm looking at the Vista friendly release of our software that we're going to be able to make next year sometime (the earlier the better). Vista gives us some really nice UI abilities and seems to fix some real annoyances that bite us under XP, most of which are all down to the nice new hardware accelerated UI. The new UI mechanism is enough reason for us to aim for Vista on it's own but there's also the rest of the new features to take advantage of as well. As...

.NET 3 Release

Having been busy for the last few days I decided to take a quick look to see when .NET 3 is released. Much to my surprise it's out already. Download is here. Time to jazz up my UI I think.

Free copies of Vista and Office 2007

If you're in the UK, a developer and take part on an online event on the 19th and 20th of January you may get one of 1000 copies of Vista and Office. Details are here. These two days are slightly awkward for me. The 20th is a Saturday so it means giving up part of my weekend and the 19th is my Birthday. Then again Vista and Office would make a nice birthday present...

Things I'd like changed for VS.NET

Time for a list of changes that I wish would be made to VS.NET 2005 I think. Unit test results screen. Can we have a way of having passing unit tests be removed from this list please so that we can only see Pending and Failed tests? If not can we have the failed tests shown a bit more clearly so we don't have to scroll through pages of passed tests first. Source Control. Ah, visual studio and integrated source control. So many releases in so many years and they all have one thing in common: They don't work...