Mobile Zone is brought to you in partnership with:

Matt has been paid to develop software for the past 12 years. He specializes in mobile and web development and has recently been doing a lot with Windows Phone 7. He runs DevEvening ( a .net focused user group in Surrey and the Windows Phone User Group ( in London. He blogs at and tweets at @mrlacey & @wpug. Matt is a DZone MVB and is not an employee of DZone and has posted 103 posts at DZone. You can read more from them at their website. View Full User Profile

Why MessageBox.Show() = Fail!

  • submit to reddit

In a recent post I stated that:

"[h]aving "MessageBox.Show()" in your code is almost always an indicator of a poorly designed interaction or notification and contributes to a poor user experience."

There was some debate in the comments about why or how I can claim this.

My aim with this statement was to summarise that post and another I'd written the day before about UX.

Here's 4 reasons why "MessageBox.Show()" sets my code senses tingling:

  1. You're likely asking an "ok/cancel" question which is therefore probably poorly worded.
  2. A message box is the laziest way of displaying information or a question. If you're displaying information in the laziest way possible I don't have confidence that you've created the best experience for the people using the app.
  3. You're showing a modal dialog. Modal dialogs are lazy and often unnecessary. Just because you have something you want to say to or ask of the user it doesn't always follow that they should be interrupted for you to do this.
  4. The standard MessageBox uses the systems default styling and can't be overridden. If you are using your own styles or colour scheme in the app then the MessageBox may end up standing out like a sore thumb when displayed.
Hopefully that makes the reasoning behind my statement clearer.

Yes, despite all this you may still want to use it. Yes, you may have a scenario where it still makes sense to use it. Yes, you may not care what I think and don't see a problem with how it looks.

No, I can't stop you using it.

What I want to do is help you to create the best apps you can and I think this is a simple example of one way you can start to do this.

Published at DZone with permission of Matt Lacey, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)