Trap Printer Dialog cancel

Trap Printer Dialog cancel

Postby Rick Lipkin » Wed Oct 05, 2011 2: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: Select all  Expand view

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
 



Image
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Trap Printer Dialog cancel

Postby James Bott » Wed Oct 05, 2011 2:23 pm

Rick,

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

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Trap Printer Dialog cancel

Postby Rick Lipkin » Wed Oct 05, 2011 2:30 pm

James

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

Done Deal!
Thanks

Rick
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 98 guests