Sends an image of a Windows Form to the destination specified by the PrintAction property.
Assembly: Microsoft.VisualBasic.PowerPacks.Vs (in Microsoft.VisualBasic.PowerPacks.Vs.dll)
The Print method prints all visible objects on the form. This includes any text or graphics drawn with Graphics methods.
By default, only the client area of the form is printed. If a user has resized the form at run time, only the currently visible part of the form will be printed. If the form has been moved so that only a part of it is visible on screen, it will still be printed as if all of the form were visible. To change the default behavior, use the overloaded Print method.
The Print method is backward compatible with the Visual Basic 6.0 PrintForm method.
The following example prints the current form to the system default printer, printing only the client area at its currently visible size. This example requires that you have a PrintForm component named PrintForm1 on a form.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.