A trivial UI guideline question - Is it ok to have MessageBox without caption ? I have a Winforms GUI with 3 confirmation boxes at different scenarios. Can anybody provide me some formal UI guidelines information on whether it is mandatory to have Captions on MessageBoxes ?

  • Why are you wanting to remove the caption?
    – Jonathan M
    Sep 14 '11 at 17:57

There's certainly no rule against it, but you aren't helping the user out without a title. Even a simple title such as "Warning" or "Confirm" is helpful to the user.

The title should describe what the message is about, where as a message icon helps distinguish the type of message.

But you should try to keep MessageBoxes to a minimum. They are usually disruptive to the end user.

  • 1
    Ok. I have a warning icon (exclamation) on the message box. But, today I checked in the code without caption and so I am wondering is it really necessary to put caption. I am just wondering... Sep 14 '11 at 18:14
  • @SeeSharp The message icons help categorize the type of message, but it doesn't necessarily convey what the message is about.
    – LarsTech
    Sep 14 '11 at 18:30
  • I am really liking the discussion. I thought this was trivial. But, again, the Message description conveys the information. So, warning icon + description makes it 'a warning message'. So, still should I put a caption based on each context ? Sep 14 '11 at 18:40
  • 1
    @SeeSharp But if it's a slightly long message, then the title gives a good "heads up" about the contents of the message. Even with a real short message, it's probably best to stay consistent.
    – LarsTech
    Sep 14 '11 at 18:45
  • cool. nice discussion. I think I should give. Subtle, but matters a lot for a nice UeXp ! Sep 15 '11 at 15:13

A window without a title does no favours for your accessibility users. Windows should always have a title.

You mentioned a warning icon, but unfortunately that's not helpful for people who use a screen reader. Screen readers typically look for a title in dialogs to give context.


Firstly the point of the title is to provide a context within which the message box is appearing. It helps relate the cause, the action, and the response to it.

Secondly, user are so used to titles, that a blank title makes you think there's an error or missing text that was meant to be there. It's why pages in printed media say 'this page intentionally left blank' instead of leaving the reader wondering if it was actually supposed to be blank.

So whilst there's not exactly a written rule for every ui toolkit that says thou shalt always title a message box, it kind of doesn't make sense not to - when you can perfectly easily. It just feels a bit lazy...?


From MSDN:

lpCaption [in, optional]
The dialog box title. If this parameter is NULL, the default title is Error.

It will show a default caption, and if the caption is not correct (when it is not about an error), it will confuse the user. I wouldn't do that.

  • I have put string.empty in my code & checked in like that. Sep 14 '11 at 18:41

There is much to do with the message boxes, and its often used for providing some kind of information(an error, or information, warning etc.)

.NEt itself provides a number of overloaded methods when you use MessageBox, which simply added that you are not bound to specific detail, If your message(than caption) can only capable of what you actually wants to tell, that's enough, else there is Caption, MessageBoxIcon, MessageBoxButton, which further can be added to your functionality, helps user to get it the way you want.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.