FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Trap Printer Dialog cancel
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Trap Printer Dialog cancel
Posted: Wed Oct 05, 2011 02:07 PM
To All

For years I have never thought about trapping the Print selection Dialog 'cancel' button .. here is my code... I would be grateful if someone could point out how I can modify this code to trap the cancel button from the Printer select dialog:

Code (fw): Select all Collapse
IF mVIEW = "V"

   // trap printer dialog cancel button from here

   PRINTER oPRINT FROM USER                ;
   PREVIEW MODAL                           ;
   NAME "Master Property Rpt for "+xLOGIN

ELSE

   PRINTER oPRINT from USER                ;
   NAME "Master Property Rpt for "+xLOGIN

   IF EMPTY( oPRINT:hDC )
      MsgStop ( "Printer not Ready !" )
      CLOSE DATABASES
      oDlg:END()
      RETURN(NIL)
   ENDIF


ENDIF



Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Trap Printer Dialog cancel
Posted: Wed Oct 05, 2011 02:23 PM

Rick,

Have you tried doing it the same way you did in the ELSE statement?

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Trap Printer Dialog cancel
Posted: Wed Oct 05, 2011 02:30 PM

James

Thanks for the second set of eyes .. just never noticed..

Done Deal!
Thanks

Rick

Continue the discussion