Printing in Visual Basic 2005 can sometimes be frustrating. Programs can't tell printers what to do; they have to respond to a PrintDocument object's request for data. Moreover, for a program to print documents that contain images, graphs or complex text formatting, some custom code may be needed.
Printing, Chapter 24 of Wrox Press' Visual Basic 2005 with .NET 3.0 Programmer's Reference, aims to ease the pain. It begins by covering basic printing, in this case of a single shape on a single sheet of paper, with the PrintDocument object and the four events that it raises. The next section goes over printing text of different font sizes and different paragraph lengths. The chapter ends with a discussion on the Visual Basic 2005 subroutines and event handlers that make it possible to print images in the appropriate size.
Read the excerpt in this PDF file.
More from this book: Using Visual Basic 2005 to enhance the clipboard
Excerpted from the Wrox book, Visual Basic 2005 with .NET 3.0 Programmer's Reference (ISBN: 978-0-470-13705-5) by Rod Stephens.
Copyright © 2007. Published by John Wiley and Sons Inc., and available at your favorite book seller. Reprinted with permission.