Graphics Printing

Just a few years ago, if you wanted to provide print preview and printer behavior, you had to write a lot of custom code for the preview device and the printer device. GDI+ insulates us from writing significantly different code even when we are targeting different devices for our graphics output.

In Visual Basic .NET, code targeted at a Windows Form is almost identical to code to produce the same result on a printer device. Because of the similarities between printing on a form versus a printer, we will not rehash the GDI+ features we have covered. Assume that scaling, translating, rotating, and other vector-based and imaging graphics capabilities just work, even when the target device is a printer. Listing 17.12 demonstrates ...

Get Visual Basic® .NET Unleashed 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.