Archive for the ‘code’ Category

Using IContextMenu to extend Windows apps

Sunday, November 12th, 2006

I read a couple of weeks ago about Google acknowledging that they’d released too many products, and deciding to focus on developing features for existing products where possible in future. screenshotWith this in mind, this evening’s idea for Windows Mobile development is an extension to one of the core applications rather than a new application.

‘Email Triage’ is my extension to Pocket Outlook. Pocket Outlook comes with Tasks, Calendar and Messaging (for emails, SMS, and MMS). Despite the way the ‘Pocket Outlook’ sounds, these are more or less separate applications, which don’t interact other than sharing a common database to store information. As a user, the common name feels like mainly a branding thing. So I thought I’d try bringing them a bit closer together.

(more…)

I can actually finish stuff! (sort of)

Sunday, November 5th, 2006

My Thinkpad is full of random bits and pieces of unfinished code. Typically, I’ll have an idea for something, and do enough of it to convince myself that I’d be able to do it. Something like a coding magpie, I then get distracted by something else and never get round to going back and finishing it. Given that, I’m all the more impressed that I got round to finishing the Windows Mobile wiki-based notetaking app that I started last Sunday.

I know about a few little kinks in the code, and I’m sure there are many more. So maybe not completely finished, but it’s in a state where I can start using it, and have made it available to a few other people to use it as well.

(more…)

Using .NET WebBrowser to create a mobile wiki

Sunday, October 29th, 2006

Wrote another Windows Mobile app tonight – this time I even tried it out on my phone and not just the emulator!

The idea of this one is an alternative to the built-in Windows Mobile “Notes” application. Instead of single ‘post-it-style’ notes, the idea is to use a wiki approach – a personal wiki, entirely hosted on the PDA. (Partly because it is quicker to use local files, but mainly because I’m too skint to pay the mobile data fees to access an online wiki :-))

I prefer the wiki approach to note-taking – mainly for the quick and easy formatting and the hyperlinks between pages. I’ve used something similar before on Palm OS for a couple of years now – ‘NoteStudio‘ by DogMelon. This is a brilliant app, which I really miss since moving to Windows Mobile as my main PDA. (There has been some talk of a Windows Mobile for a while now, but this is looking a little like vaporware).

When I saw that the .NET compact framework included a web browser widget, I thought I’d see how hard it would be to knock together a wiki tool tonight.

(more…)

Hello (Windows Mobile) World!

Saturday, October 28th, 2006

Finally – a chance to play with my new Windows Mobile developer kit. I had my first go with it tonight, and so far, I’m pretty impressed.

The Windows Mobile 5 API exposes a lot of nice stuff to the developer – just looking through the overview page on MSDN.com showed me lots of stuff I want to have a go with. Like interacting with the phone, incoming calls, SMS messages – sent or received, using the phone’s internal camera, getting all sorts of system info like battery data, and loads more. So much to play with! The overview page also shows how easy it is to access the Pocket Outlook database, so I thought that this would be a good place to start.

(more…)

My Windows Mobile developer kit has arrived!

Wednesday, October 25th, 2006

Microsoft give away free developer resource kits for Windows Mobile. A two-disc DVD set, it comes with everything needed to write apps for Windows Mobile 5 – an IDE, SDK, the .NET Compact Framework, emulators for development and testing, API and documentation, and a bunch of educational resources like samples, walkthroughs and videos. I ordered it a little while ago, and it’s finally come.

I’m out tonight, so will have to wait before I can have a play. I’m looking forward to it, though – will have to try writing a small app for my phone tomorrow night.

What happens to Outlook add-ins when Outlook goes away?

Sunday, October 15th, 2006

I tried writing another Outlook extension tonight. This time, a desktop widget to display a dashboard-style at-a-glance view of how busy I am (based on my Microsoft Outlook task list).

screenshot of the app I wrote it to run in the background, and update itself once a minute. This raised an interesting question – what to do with the handle to Outlook.

Getting the handle to Outlook is probably the slowest bit of the app, so I don’t want to do this every minute. But caching a handle and reusing it ad-infinitum probably isn’t safe – what if Outlook is closed or restarted, (or… whatever happens when Windows hibernates?) while the widget app is running? Would the widget hold locks on the Outlook data file and cause a closing Outlook to hang? Or would the widget just fall over the next time it tried to use an invalid handle to the Outlook object model?

(more…)

Why Outlook has started seeing me as a security risk

Wednesday, October 4th, 2006

I wrote a bunch of command-line apps a while ago that let me control my Outlook task list. As a big GTD devotee, everything that I do revolves around my task list. And as someone who spends a lot of time at the command prompt, these apps mean being able to add something to my task list when I think of it – without interrupting what I am doing. It means not needing to Alt-Tab to Microsoft Outlook, waiting for it to wake up, opening a new Form… all of which takes me away from what I was doing when I thought of whatever task needed capturing on my list.

But recently, Outlook started throwing up security warnings when I use them… which means I have to Alt-Tab to Outlook anyway to tick the box telling it it’s not under attack. 🙁

(more…)

Windbg can do my job for me ;-)

Friday, September 29th, 2006

windbg is a debugger for Windows. It can step through programs while they run, or be used to examine the dumps produced when Windows crashes or hangs (including when you get the infamous blue-screen-of-death).

And with a couple of simple commands, it can get you a long way towards figuring out the cause of the problem.

(more…)