PrintForm Class
Enables printing an image of a Windows Form at run time.
Namespace: Microsoft.VisualBasic.PowerPacks.Printing
Assembly: Microsoft.VisualBasic.PowerPacks.Vs (in Microsoft.VisualBasic.PowerPacks.Vs.dll)
Syntax
'Declaration
<ToolboxBitmapAttribute(GetType(PrintForm), "Microsoft.VisualBasic.PowerPacks.Printing.PrintForm.bmp")> _
Public Class PrintForm _
Inherits Component
'Usage
Dim instance As PrintForm
[ToolboxBitmapAttribute(typeof(PrintForm), "Microsoft.VisualBasic.PowerPacks.Printing.PrintForm.bmp")]
public class PrintForm : Component
[ToolboxBitmapAttribute(typeof(PrintForm), L"Microsoft.VisualBasic.PowerPacks.Printing.PrintForm.bmp")]
public ref class PrintForm : public Component
public class PrintForm extends Component
Remarks
The PrintForm component enables you to print an image of a form to a printer, to a print preview window, or to a file at run time. Its behavior replaces that of the PrintForm method in earlier versions of Visual Basic.
Examples
The following example shows a common use of the PrintForm component.
Dim pf As New PrintForm
pf.Form = Me
pf.PrintAction = PrintToPrinter
pf.Print()
Inheritance Hierarchy
System.Object
System.MarshalByRefObject
System.ComponentModel.Component
Microsoft.VisualBasic.PowerPacks.Printing.PrintForm
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
Reference
Microsoft.VisualBasic.PowerPacks.Printing Namespace
Other Resources
PrintForm Component (Visual Basic)
How to: Print a Form by Using the PrintForm Component (Visual Basic)
How to: Print the Client Area of a Form (Visual Basic)
How to: Print Client and Non-Client Areas of a Form (Visual Basic)
How to: Print a Scrollable Form (Visual Basic)
Deploying Applications That Reference the PrintForm Component