13.5. Forms: When Message Boxes and Input Boxes Won't Suffice

As you've seen in this chapter, a message box can greatly enhance a procedure by enabling the user to make a choice at a turning point or by presenting the user with important information. But once you've used message boxes for a while, you're apt to start noticing their limitations:

  • You can present only a certain amount of information, and you're limited in the way you can display it (to whatever layout you can conjure up with new paragraphs, line breaks, tabs, and spaces).

  • You can use only seven sets of buttons, which limit the possibilities of message boxes.

While you can get creative and enter complex messages in message boxes to make the most use of the buttons they offer, you'll usually do better to use a custom dialog box instead. As you'll see in Chapters 14 and 15, custom dialog boxes are relatively simple to create, and they give you far more power and flexibility than message boxes do.

You'll generally want to avoid writing procedures that present the user with a number of choices via a sequence of message boxes. Similarly, input boxes are useful for retrieving a single piece of information from the user, but beyond that, their limitations quickly become apparent. If you find yourself planning to use two or more input boxes in immediate succession, create a custom dialog box instead.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.133.245