Printer.Abort Method | |
Instruct the printer to abort the current print job.
Namespace:
VO
Assembly:
VOGUIClasses (in VOGUIClasses.dll) Version: 2.21
Syntax 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:
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