PrintForm Class
Collapse the table of content
Expand the table of content

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)

System.Object
  System.MarshalByRefObject
    System.ComponentModel.Component
      Microsoft.VisualBasic.PowerPacks.Printing.PrintForm

[ToolboxBitmapAttribute(typeof(PrintForm), "Microsoft.VisualBasic.PowerPacks.Printing.PrintForm.bmp")]
public class PrintForm : Component

NameDescription
System_CAPS_pubmethodPrintForm()

Initializes a new instance of the PrintForm class.

System_CAPS_pubmethodPrintForm(Form)

Initializes a new instance of the PrintForm class, specifying the Form where it will be parented.

System_CAPS_pubmethodPrintForm(IContainer)

Initializes a new instance of the PrintForm class, specifying the IContainer in which it will be parented.

NameDescription
System_CAPS_protpropertyCanRaiseEvents

(Inherited from Component.)

System_CAPS_pubpropertyContainer

(Inherited from Component.)

System_CAPS_protpropertyDesignMode

(Inherited from Component.)

System_CAPS_pubpropertyDocumentName

Gets or sets the document name to display (for example, in a print status dialog box or printer queue) while printing the document.

System_CAPS_protpropertyEvents

(Inherited from Component.)

System_CAPS_pubpropertyForm

Gets or sets the form to be printed.

System_CAPS_pubpropertyPrintAction

Gets or sets a value indicating whether the output is directed to a printer, to a print preview window, or to a file.

System_CAPS_pubpropertyPrinterSettings

Gets or sets a PrinterSettings object that you can use to specify various properties of a printer.

System_CAPS_pubpropertyPrintFileName

Gets or sets the file name of an Encapsulated PostScript file and the path to which the file will be saved when the PrintAction property is set to PrintToFile.

System_CAPS_pubpropertySite

(Inherited from Component.)

NameDescription
System_CAPS_pubmethodCreateObjRef(Type)

(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodDispose()

(Inherited from Component.)

System_CAPS_protmethodDispose(Boolean)

Releases the unmanaged resources used by a PrintForm component and optionally releases the managed resources.(Overrides Component.Dispose(Boolean).)

System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Component.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetLifetimeService()

(Inherited from MarshalByRefObject.)

System_CAPS_protmethodGetService(Type)

(Inherited from Component.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodInitializeLifetimeService()

(Inherited from MarshalByRefObject.)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone(Boolean)

(Inherited from MarshalByRefObject.)

System_CAPS_protmethodOnBeginPrint(PrintEventArgs)

Raises the BeginPrint event.

System_CAPS_protmethodOnEndPrint(PrintEventArgs)

Raises the EndPrint event.

System_CAPS_protmethodOnQueryPageSettings(QueryPageSettingsEventArgs)

Raises the QueryPageSettings event.

System_CAPS_pubmethodPrint()

Sends an image of a Windows Form to the destination specified by the PrintAction property.

System_CAPS_pubmethodPrint(Form, PrintForm.PrintOption)

Sends an image of a Windows Form to the destination specified by the PrintAction property, specifying the form and printing options

System_CAPS_pubmethodToString()

(Inherited from Component.)

NameDescription
System_CAPS_pubeventBeginPrint

Occurs when the Print method is called, before the first page of the document prints.

System_CAPS_pubeventDisposed

(Inherited from Component.)

System_CAPS_pubeventEndPrint

Occurs when the last page of the document has printed.

System_CAPS_pubeventQueryPageSettings

Occurs immediately before each page is printed.

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.

The following example shows a common use of the PrintForm component.

Dim pf As New PrintForm
pf.Form = Me
pf.PrintAction = PrintToPrinter
pf.Print()

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft