Printer Class (Typed) |
|
Namespace: XSharp.VO.SDK
The Printer type exposes the following members.
| Name | Description | |
|---|---|---|
| Abort |
Instruct the printer to abort the current print job.
| |
| BeginDoc | ||
| Handle |
Return the handle for a printer.
| |
| Idle |
Instruct the system to process events while printing.
| |
| IsValid |
Determine if a printer is valid.
| |
| NewPage |
Direct the attached printer to eject to a new page.
| |
| PrinterError |
Called if a printer error occurs. PrintErrorEvent is interrogated to identify the type of error has occurred.
| |
| PrinterExpose |
Invoked for each page (or part of a page) of the print job whenever it needs repainting.
| |
| Start |
Start a print job or contiguous portion of a print job.
|
1METHOD PrinterExpose(oPEE) CLASS PrinterClass 2SELF:TextPrint("Hello World",Point{30,30}) 3RETURN FALSE // Nothing more to print 4CLASS PrinterClass INHERIT Printer 5METHOD Init() CLASS PrinterClass 6SUPER:Init() 7RETURN SELF 8METHOD MenuCommand(oMCE) CLASS StandardShellWindow 9LOCAL oPrinter AS PrinterClass 10IF(oMCE:ItemID = ; 11IDM_EMPTYSHELLMENU_FILE_PRINT_ID) 12// File Print menu item ID 13oPrinter := PrinterClass{} 14IF(oPrinter:IsValid()) 15oPrinter:Start() 16oPrinter:Destroy() 17ENDIF 18ENDIF