TCnPrintDocument Class

Defines a reusable object that sends output to a printer, when printing from a Windows Forms application.

Namespace: CNClrLib.Component.PrintDocument
TComponent
  CNClrLib.Control.Base.TClrBaseComponent
    CNClrLib.Component.PrintDocument.TCnPrintDocument
type
 TCnPrintDocument = class(TClrBaseComponent)
 end;

The TCnPrintDocument type exposes the following members.

Show:
 NameDescription
Create(TComponent)

Creates and initializes a TCnPrintDocument instance. (Overrides TClrBaseComponent.Create(TComponent).)

Destroy

Frees the resources allocated with a TCnPrintDocument instance. (Overrides TClrBaseComponent.Destroy.)

Top
Show:
 NameDescription
DefaultClrObject

Get the common language runtime object interface for this component. (Inherited from TClrBaseComponent.)

DefaultPageSettings

Gets or sets page settings that are used as defaults for all pages to be printed.

DocumentName

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

OriginAtMargins

Gets or sets a value indicating whether the position of a graphics object associated with a page is located just inside the user-specified margins or at the top-left corner of the printable area of the page.

PrintController

Gets or sets the print controller that guides the printing process.

PrintDocumentIntf

Gets the .Net PrintDocument object as interface.

PrinterSettings

Gets or sets the printer that prints the document.

Top
Show:
 NameDescription
Dispose

Releases the resources used by the Component. (Inherited from TClrBaseComponent.)

DoGetDefaultClrObject

Represents method DoGetDefaultClrObject. (Inherited from TClrBaseComponent.)

DoGetDotNetBaseComponent

Represents method DoGetDotNetBaseComponent. (Overrides TClrBaseComponent.DoGetDotNetBaseComponent.)

GetClrObject

Represents method GetClrObject. (Inherited from TClrBaseComponent.)

Print

Starts the document's printing process.

RegisterEventCallBack(ClrWString,Pointer)

Add an event to the instance using the specified event name and function pointer which is the event handler. The RegisterEventCallBack method does not directly add the event handler to the event. A hooking mechanism is used such that if the event is fired, the hook event is also fired which in turn calls the function pointer. (Inherited from TClrBaseComponent.)

RegisterEventSource

Register the Delphi object which will raise the .Net event handler. (Inherited from TClrBaseComponent.)

UnRegisterEventCallBack(ClrWString,Pointer)

Remove an event from the instance using the specified event name and function pointer which is the event handler. (Inherited from TClrBaseComponent.)

UnRegisterEventSource

Unregister the Delphi object which raised the .Net event handler. (Inherited from TClrBaseComponent.)

Top
Show:
 NameDescription
BeginPrint

Occurs when the Print() method is called and before the first page of the document prints.

EndPrint

Occurs when the last page of the document has printed.

OnPrintPage

Occurs when the output to print for the current page is needed.

OnQueryPageSettings

Occurs immediately before each OnPrintPage event.

Top

See C:\Users\Public\Documents\CrystalNet Technologies\.Net VCL for Delphi Demo Folder after installation for examples of how to use this component.