Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

How to: Print a Scrollable Form (Visual Basic)

The PrintForm component enables you to quickly print an image of a form without using a PrintDocument component. By default, only the currently visible part of the form is printed; if a user has resized the form at run time, the image may not print as intended. The following procedure shows how to print the complete client area of a scrollable form, even if the form has been resized.

To print the complete client area of a scrollable form

  1. In the Toolbox, click the Visual Basic PowerPacks tab and then drag the PrintForm component onto the form.

    The PrintForm component will be added to the component tray.

  2. In the Properties window, set the PrintAction property to PrintToPrinter.

  3. Add the following code in the appropriate event handler (for example, in the Click event handler for a Print Button).

    PrintForm1.Print(Me, PowerPacks.Printing.PrintForm.PrintOption.Scrollable)
    
    NoteNote:

    On some operating systems, text or graphics drawn by Graphics methods may not print correctly. In this case, you will not be able to print with the Scrollable parameter.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft