Printing with Windows Forms

The .NET framework includes several classes you can use to interact with your printer. You can print text and graphics, as well as control printer settings such as margins and resolution. In addition, several classes create dialog boxes that make it easy for the end user to select printers or view a report onscreen before sending it to the printer. Printing in Windows Forms is graphics-based. Even if you want to print only lines of text, you still lay out your printed pages using graphics methods. These methods are the same methods that you use to draw on a Windows form and are located in the System.Drawing.Graphics namespace.

→ For more on graphics methods, see Chapter 14, “Designing an Effective User Interface,” ...

Get Special Edition Using Microsoft® Visual Basic® .NET 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.