[futurebasic] Re: [FB] Basic Printing Question Solved

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 2002 : Group Archive : Group : All Groups

From: Joe Lewis Wilkins <PepeToo@...>
Date: Mon, 04 Nov 2002 09:55:27 -0800
Problem:
To print a Picture Field (only tried it with a Resource Picture)

Solution:
Since the window with the Picture Field may have other things on it that 
you don't want to Print, and the Dialogs coming up in front of the 
window cause a blank area when printed, it is important to first create 
a temporary window. The following  works beautifully.

LONG IF PRCANCEL = 0       'User didn't cancel
  WINDOW OUTPUT _PrintWdw  'Open a temporary window

  PICTURE FIELD #1,%gPictRsrc%,(0,0)-(769,548),_statNoFramed,_centerPict 

  PAGE LPRINT              'Does the grunt work

  WINDOW CLOSE _PrintWdw   'Then close it
XELSE
  gPrtAbort% = _true       'User Cancelled
END IF

Remaining Problems:
1.  Manual says that the Page Setup dialog is offered first. Doesn't 
always happen. Not sure why yet.
2.  If user Cancels the Print Dialog, the Page Setup needs to be done 
again. I can fix that I think.
3.  The PAGE LPRINT statement changes the cursor to a b/w beachball, and 
doesn't change it back when it is done, or if the user Cancels the Print 
Dialog. I haven't figured out what I need to do to fix this.

Notice there is no _RouteToPrinter or _RouteToScreen required.

This should help somebody, someday.

Joe Wilkins