16
votes

Many know of the MessageBoxIcon of type "question". If you are not particularly familiar with this icon, it is just a glorified question mark. I am curious as to whether or not this icon is acceptable in professional applications. For example, let's assume that I have a button which, when clicked, will clear all text fields on the entire form. When the button is clicked I would like to warn the user about what his action is about to do. I could write either of the following:

MessageBox.Show("Really clear all data?", "Clear confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

OR

MessageBox.Show("Really clear all data?", "Clear confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);

Which would you all say is the more professional of the two?

9

9 Answers

27
votes

I don't really think it's an issue of "professionalism", but it definitely contradicts Microsoft's guidelines.

The documentation for the MB_ICONQUESTION flag has this to say (and the same for the "Question" member of the MessageBoxIcon enum):

A question-mark icon appears in the message box. The question-mark message icon is no longer recommended because it does not clearly represent a specific type of message and because the phrasing of a message as a question could apply to any message type. In addition, users can confuse the message symbol question mark with Help information. Therefore, do not use this question mark message symbol in your message boxes. The system continues to support its inclusion only for backward compatibility.

And the Standard Icons section of the Windows User Experience Interaction Guidelines says very explicitly that the question mark icon should only be used to indicate a "Help entry point":

Question mark icons

  • Use the question mark icon only for Help entry points. For more information, see the Help entry point guidelines.
  • Don't use the question mark icon to ask questions. Again, use the question mark icon only for Help entry points. There is no need to ask questions using the question mark icon anyway—it's sufficient to present a main instruction as a question.
  • Don't routinely replace question mark icons with warning icons. Replace a question mark icon with a warning icon only if the question has significant consequences. Otherwise, use no icon.

I highly recommend that you read the entire document; it provides lots of helpful tips on choosing the correct icon. But in this particular case, since you're asking the user to confirm an operation that involves the potential loss of data, you should definitely use the warning icon, consistent with this guideline:

  • For question dialogs, use warning icons only for questions with significant consequences.
4
votes

I would use a warning icon for dialogs that warn the user that something bad (or irreversible) will happen.

The point of a warning icon is to draw the user's attention to the fact that he's about to make a mistake.
This is true even if the dialog contains a question.

3
votes

Well clearing data is something that needs to highlighted correctly. The users must be warned, especially when it is All Data, and if you don't have any backup solutions. Thus the second one is more appropriate in this scenario

2
votes

I generally follow the rule that if you use a Warning icon, it should indicate the issue, like:

Clearing of the data cannot be undone. Would like to continue?

A question would be more like:

Are you sure you want to clear all the data?

The text should also be complete and grammatically correct sentences.

2
votes

More important than the icon: you should make the No button the default if you feel it's a potentially risky action, i.e. use an overload that takes a MessageBoxDefaultButton parameter and specify:

...,MessageBoxDefaultButton.Button2
2
votes

The most professional thing would be to make the action undoable, and thus make the confirmation/warning completely unnecessary.

If it truly cannot be undoable, then follow the Windows guidelines, as Cody listed in his answer.

1
votes

They're equally professional or unprofessional depending on your perspective =). You should consider what you are trying to communicate to your user. From your description of the problem, I would lean towards using 'warning' since it seems that clearing these fields may have negative consequences.

0
votes

The reality of it is you could use either, and it would look fine. But that wouldn't mean it was designed correctly.

Clearing all the user's data is something that should have a warning icon.

The reason? The message you are popping up should convey the situation at hand. Using the ? icon probably doesn't convey the right message. Using the warning icon does though - since the user should be warned that the application intends to clear all of her data.

0
votes

Honestly.. I would say "Are you sure you wish to clear all data" instead of "Really clear all data?"... No mather what the icon is.

For information on the icon you can read the other posts!