How to: Print Client and Non-Client Areas of a Form
The PrintForm component enables you to quickly print an image of a form exactly as it appears on screen without using a PrintDocument component. The following procedure shows how to print a form, including both the client area and the non-client area. The non-client area includes the title bar, borders, and scroll bars.
To print both the client and the non-client areas of a form
In the Toolbox, click the Visual Basic PowerPacks 2.0 tab and then drag the PrintForm component onto the form.
The PrintForm component is added to the component tray.
In the Properties window, set the PrintAction property to PrintToPrinter.
Add the following code in the appropriate event handler (for example, in the Click event handler for a Print button).
On some operating systems, text or graphics drawn by System.Drawing.Graphics methods may not print correctly. In this case, use the compatible printing method: PrintForm1.Print(Me, CompatibleModeFullWindow).