When I started in programming, there was a manual with a number of GUI guidelines. The input fields were color coded. For instance, a mandatory field would be yellow and an ordinary field would be white. If the input would not conform to the expected input or format, the field would be colored red. The reason was to prevent message boxes telling the user some input was wrong. Also, when any field was red, the [Accept] button would be disabled.
Ever since, I've been using message boxes only for crashes, debugging or when closing an application (save or not).
I am wondering which other uses the message box (or alert, or whatever) might have. I'm asking here because it is a design decision, not a programming decision.