Chapter 9: Printing with Visual Basic
The Printer object
Printouts with multiple character fonts
Printouts with shapes and images
- Your own print preview window
Many people have speculated that someday there would be no need for printed output. My belief is that this will never happen—at least not in my lifetime. Too many people rely on paper for various purposes. The classic example of the senior executive who has a secretary print out e-mail and then writes replies on paper for the secretary to retype and send is all too true.
Of course, there are some valid reasons for generating paper output. Invoices, bills, packing lists, and other such documents really need to be on paper, since most computer systems still don’t talk to each other directly. Also, it is much easier to stuff a piece of paper in your pocket than haul around a computer. Printing a list of grocery items your spouse e-mailed you earlier in the day makes much more sense than carrying your computer through the store (especially if you don’t own a laptop!).
In this chapter, we will focus on printing using the Printer object and other tools that make it easy to generate output for your printer. I’ll start with an overview of the Printer object and then talk about the different ways you can select a printer. Then I’ll discuss how to generate output, followed by how to build your own print preview window.