Chapter 8. Displaying Dialog Boxes

Visual Basic 2008 provides several built-in dialog boxes that help you provide a rich user interface in your front-end applications. These dialog boxes provide the same common user interface that is found in most Windows applications. They also provide many properties and methods that allow you to customize these dialog boxes to suit your needs while still maintaining the standard look of Windows Forms applications.

In this chapter, you will learn about the following:

  • Creating a message box using different buttons and icons

  • Creating an Open dialog box that enables you to open files

  • Creating a Save dialog box that enables you to save files

  • Creating a Font dialog box that enables you to apply the selected font to text

  • Creating a Color dialog box that enables you to define and select custom colors

  • Creating a Print dialog box that prints text from your application

  • Creating a Browse dialog box that enables you to browse for folders

This chapter explores these dialog boxes in depth and shows how you can use them in your Visual Basic 2008 applications to help you build more professional-looking applications for your users.

The MessageBox Dialog Box

The MessageBox dialog box is one of those dialog boxes that you will use often as a developer. This dialog box enables you to display custom messages to your users and accept their input regarding the choice that they have made. This dialog box is very versatile; you can customize it to display a variety of icons with ...

Get Beginning Microsoft® Visual Basic® 2008 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.