Click or drag to resize

Printer.Abort Method (Typed)

X#
Instruct the printer to abort the current print job.

Namespace:  XSharp.VO.SDK
Assembly:  XSharp.VOGUIClasses (in XSharp.VOGUIClasses.dll) Version: 2.19
Syntax
 VIRTUAL METHOD Abort() AS USUAL
Request Example View Source

Return Value

Type: Usual
Remarks
Typically, you would create and display a dialog before starting the print job. If the user presses a push button on the dialog window to cancel the job, the Window:ButtonClick() event handler would invoke this method.
Examples
This example displays a dialog and starts a print job. If the Abort push button is pressed, the Window:ButtonClick() event handler aborts the job:
X#
 1CLASS AbortDialog INHERIT DialogWindow
 2HIDDEN oPrintJob AS OBJECT
 3METHOD Init(oWindow,oPrinter) CLASS AbortDialog
 4SUPER:Init(oWindow,ResourceID{IDD_ABORT})
 5oPrintJob := oPrinter
 6METHOD ButtonClick(oControlEvent) CLASS AbortDialog
 7oPrintJob:Abort()
 8SELF:EndDialog(1)
 9METHOD FilePrint() CLASS TopAppWindow
10oPrinter := Printer{}
11IF(oPrinter:IsValid())
12oDialog := AbortDialog{SELF,oPrinter}
13oDialog:Show()
14oPrinter:Start()
15ENDIF
See Also