Pedro
unread,Mar 15, 2013, 2:41:47 AM3/15/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to multisoft...@googlegroups.com
Can anyone spot the error in this simple printing program. It is a problem that I've been having since the GUI printing enhancements became available in Flagship 7 (or was it 6, I forget which). The background info is; using Flagship 7.01.19a for MS-VC6++ on windows 8. Earlier releases of Flagship and all versions of windows back to XP produced the same problem.
*% TESTPRINT.PRG 15/03/2013 TESTING PRINT DRIVER SELECTION PROBLEM.
oPrinter:Setup()
IF oPrinter:SetupAborted
RETURN
ENDIF
mydriver := oPrinter:Driver
FOR mycounter=1 to 3
oPrinter:Driver := mydriver
PrintGui(.T.)
@ 0,1 SAY 'DOCUMENT ' + STR(mycounter,1)
PrintGui()
NEXT mycounter
RETURN
Run this and select a printer that IS NOT your default printer. Document 1 will go to the selected printer but document 2 and 3 will print to your default printer. Using the debugger I verified that oprinter:driver was being correctly set each time, but it appears to me that PrintGui() ignores this setting and uses some 'deeper' (inaccessible) variable to hold the driver reference. On a similar issue - does anyone know if we can access the 'print duplex/doublesided' flag in the printer settings through Flagship?
Thanks in advance.