le 10/10/06 15:46, Carlo Rubini <[EMAIL PROTECTED]> a écrit :

> I start a printing job from a RB app.
> 
> In the system-window I click on 'Preview', and while the system is loading the
> various pages I click the Cancel button. My application aborts.
> 
> Is there a way to trap such userCancelled event?

Before drawing a page to your graphic object, you could test system printing
error :

Create a function (ContinuePrinting for example) with this code :

  dim ok As Boolean
  
  // MACINTOSH
  #IF TargetMacOS
  #IF TargetCarbon
  Declare SUB PMError Lib "CarbonLib" () as Integer
  #ELSE
  Declare SUB PMError Lib "InterfaceLib" alias "PrError" () as Short
  #ENDIF
  ok = (PMError() = 0)
  
  // WINDOWS
  #ELSE
  ok = true  // Don't know if it does exist an appropriate declare
  #ENDIF
  
  RETURN ok


Best regards

François Van Lerberghe
Rue Thier Monty, 15 A
4570 Marchin
Belgique

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to