Archive for March, 2009

Using a custom WndProc in WPF apps

A current project at work needs to be able to respond to USB ‘thumb’ drives being inserted and removed. In Windows, such notifications are handled by processing the WM_DEVICECHANGE message. Using Windows Forms this is reasonably straightforward: the Form class has a protected WndProc method that can be overridden, like so:

protected override void WndProc(ref Message m)
{
    if (m.Msg == WM_DEVICECHANGE)
    {
        // Handle WM_DEVICECHANGE...
    }

    base.WndProc(ref m);
}

Unfortunately the same technique cannot be used in WPF applications. The spiritual equivalent of the Form class in WPF is Window, which has no WndProc method to override. So what to do?

Read the rest of this entry »

,

No Comments

Money’s too tight (to mention)

The Rands family budget is seriously stretched these days. On top of all the usual household bills, we’re having to replace Paula’s trusty Toyota Yaris with a new car, and we’re also looking to get Evie into a nursery for a couple of days per week. We don’t have an extravagant lifestyle by any means, which means we’re having to economise in other areas.

First to be trimmed was the Sky subscription. We’ve gone from having the full package (basically all the channels plus movies and sports) to just the Variety and Kids packs. This means we still get the free-to-air channels plus stuff like Sky 1 (important for Lost, BSG, etc) and all of the kiddie channels that Evie watches. We’re still paying for HD, so the subscription is now £27.50 per month as opposed to £57, but it’s a reasonable saving. The only thing I’m really gonna miss is the occasional Liverpool match on Sky Sports (crappy timing given the trip to United this weekend, but there you go).

Next on the list was our broadband service. We’ve been with Zen Internet since we moved here in 2004, and although I’ve been totally satisfied with their service it’s well known that Zen are one of the more expensive ISPs. Then again, you get what you pay for, and I didn’t fancy the idea of switching providers to save a few quid only to lose our rock-solid connection. So I decided to stay with Zen, but switch from our current unlimited product to one of their capped services. At home we mainly use the internet for email and web browsing, so the capping isn’t going to affect us much, if at all. Added to that, the capped service is not only cheaper but also faster: we’ve gone from paying around £24 per month for a half-meg service, to paying just over £17 for a 3½ Mbps service. No complaints so far: the regrade went without a hitch, and our connection seems as reliable as ever. Kudos to Zen! No surprise they’ve won the PC Pro Best ISP Award for the past five years in a row.

Reducing the amount of money we spend on TV and broadband is a start, but we’re still looking to make savings elsewhere. Even then, Paula’s still going to have to go back to work part-time so that we can afford to place Evie in a nursery. When did life get so damn expensive?

, ,

No Comments

New year, new job

The last time I posted about my job, I was working for Moneysupermarket.com. I suffered through that for about a year, then escaped to work for a company called Legal Marketing Services. Another year passed, then I was made redundant (curse you, Credit Crunch!). Fortunately however, I managed to find a new job at the start of this year: my current employer is a company called SeaTechnik.

I haven’t really enjoyed my job for years, ever since I met my wife-to-be in fact. Whether that’s coincidence or not I don’t know; priorities change when someone special enters your life, that’s for sure. Nevertheless there’s no reason why you can’t be content at work also. Several years ago, I had the good fortune to wind-up in a job where I had a fantastic working relationship with my colleagues, and where I had the opportunity to help design and code a new front- and back-end system more-or-less from scratch. Ever since I left that job, and stopped working with those people, work has never been the same for me. Although I’ve done interesting stuff since, and worked with some nice people, I’ve never experienced the same team spirit, nor cared as much about the end product.

Hopefully, this is all now starting to change. It’s early days at SeaTechnik, but already the signs are very encouraging. I’m using cutting-edge .Net stuff like Windows Presentation Foundation and Windows Communication Foundation, and being given a lot of leeway to design and code the final product as I see fit. I haven’t felt as energised about what I’ve been doing since back when I was working on the Amber project with Rob and John. My colleagues and superiors seem to trust that I know what I’m doing, and that’s something I’ve not experienced for quite some time now. Long may it continue.

,

No Comments

Back again

I thought it was about time the blog received some much-needed attention. I’ve finally upgraded to the latest version of WordPress (2.7), and found a new visual theme which I really like. Obviously a lot has happened since I last posted over a year ago; hopefully I’ll get around to talking about it soon. My intention now is to blog more frequently, but in smaller chunks, so that I don’t sweat over what I’m writing so much. We’ll see how it goes.

No Comments