Microsoft Visual Basic 2005 Step by Step (Step by Step (Microsoft))

Chapter 17

Working with Printers

After completing this chapter, you will be able to:

In the following sections, you'll complete your survey of user interface design and components by learning how to add printer support to your Windows applications. Microsoft Visual Basic 2005 supports printing by offering the PrintDocument class and its many objects, methods, and properties, which facilitate printing.

Upgrade Notes: Migrating Visual Basic 6 Code to Visual Basic 2005

If you're experienced with Microsoft Visual Basic 6, you'll notice some new features in Visual Basic 2005, including the following:

In this chapter, you'll learn how to print graphics and text from Visual Basic programs, manage multipage printing tasks, and add printing dialog boxes to your user interface. In my opinion, this chapter is one of the most useful in the book, with lots of practical code that you can immediately incorporate into real-world programming projects. Printing support doesn't come automatically in Visual Basic 2005, but the routines in this chapter will help you print longer text documents and display helpful dialog boxes such as Page Setup, Print, and Print Preview from within your programs. I'll start the chapter with two very simple printing routines to show you the basics, and then I'll get considerably more sophisticated.

Категории