Tuesday, January 13, 2009

The Error Message - the fresh glance.

December 2008 issue of MSDN magazine introduces the new column called Usability in Practice. January 2009 issue includes the first Usability in Practice article from which I learned something new.
The article itself isn't very worth. Almost entire content of the article is brief description of Error Message guidelines part of Windows Vista Users Experience Guidelines. Error message guideline has the great, comprehensive and straightforward directions of how the application error messages should be constructed. Actually the guideline has two logical parts - what information should be presented by the error message and how the error message should look like. The first part is quite clear and just tells us which points and questions we should consider for good error messages constructing. The second part - how the error message dialog should look like - is the thing which this post about.

Task Dialog
Windows Vista introduces a new standard dialog box called task dialog. According to the error messages guideline the task dialogs should be used to show the error message if the error can't be fixed immediately, if the error isn't contextual user input problem and if the error isn't delayed detected problem. I.e. When Things Go Wrong article demonstrates how the simple error message can be presented by the task dialog. Here is the table that shows the correspondence between the task dialog areas and the simple error message parts.
Task dialog areaError message part
Title barA problem. States that a problem occurred.
Main instructionA cause. Explains why the problem occurred.
Content areaA solution. Provides a solution so that users can fix the problem.
Command areaCommit button(Close).

Using task dialog in .NET application.
The managed code can create and show the task dialog using the corresponding API. The example of wrapping task dialog API in the managed code can be found in CodeProject.
But the task dialog API is supported only by Vista. What about earlier versions of Windows? Which dialog we should use for show the error message if the application is run in Windows XP? What about using MessageBox class? Unfortunately, MessageBox dialog doesn't allow distinguish between the main instruction area and the content area which I referred above. However, I think we definitely should follow the error message guideline and at least simulate the task dialog for non-Vista(and non-Windows 7) OS. At least for the simple error message we should show the dialog which has the parts described above. Here is the very basic sample of error message dialog that can be used in Windows XP:

The sample of task dialog emulator can be found in CodeProject as well. However, if I need to show the simple error messages only, I would implement the simple task dialog emulator like one that is shown in the picture above.

I will definitely follow the error message guideline in the future and revise the existing error messages in the product I actively work on.

1 comment:

  1. I didn't do this enough, but now realize the importance of it. I've created a slick dialog which allows reporting errors in my app now and have seen the benefit right away. Nice post!