7 Displaying Dialogs

WHAT YOU WILL LEARN IN THIS CHAPTER:

  • Creating a message box using different buttons and icons
  • Creating an Open dialog that enables you to open files
  • Creating a Save dialog that enables you to save files
  • Creating a Font dialog that enables you to apply the selected font to text
  • Creating a Color dialog that enables you to define and select custom colors
  • Creating a Print dialog that prints text from your application
  • Creating a Browse dialog that enables you to browse for folders

WROX.COM CODE DOWNLOADS FOR THIS CHAPTER

The wrox.com code downloads for this chapter are found at www.wrox.com/ begvisualbasic2015 on the Download Code tab. The code is in the 092117 C07.zip download and individually named according to the names given throughout the chapter.

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

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

THE MESSAGEBOX

MessageBox is one of those dialogs that you will use often as a developer. This dialog enables you to display custom messages ...

Get Beginning Visual Basic 2015 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.