Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending text to printer
Message
De
15/05/1997 09:19:17
 
 
À
14/05/1997 23:16:57
Larry Long
ProgRes (Programming Resources)
Georgie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00032292
Message ID:
00032411
Vues:
37
>>>>In v2.6 we used @SAY to send a line of text to printer, in Visual we are unable to use @SAY and therefore use ??.
>>>>
>>>>The problem is (Using FoxPrint, 12 pt) that ?? only allows 79 characters accross and wraps the 80th. @SAY works fine.
>>>>
>>>>Example
>>>>
>>>>SET PRINTER ON
>>>>SET PRINTER FONT "FoxPrint", 12
>>>>SET CONSOLE OFF
>>>>FOR lnCount = 1 TO 10
>>>>(Works) ?? REPL('X',80)
>>>>(Doesn't) @ 0,0 SAY REPL('X',80)
>>>>
>>>>ENDFOR
>>>>SET PRINTER OFF
>>>>SET PRINTER TO
>>>>
>>>>Any help/insight would be appreciated. Thanks in advance.
>>>
>>>have you tried foxprint 10 pt?
>>
>>That is a thought, however, this is to be used with a pre-formatted form in which we do not design, and before we spend time trying to modify our code to run at 10pt, I was hoping there is a way to work with 12 pt. Either way. thanks much for the input.
>
>I am not sure but have you tried triple ?, that writes directly to the port? ie,
>??? repl('x',80)

Thanks, but unfortunately ??? sends directly to the printer by-passing the print driver, thererfore using the default Printer font and not the one we specify (FoxPrint).

The good news is we've found a work-around in MS KnowledgeBase (BUG: @...SAY Prints Gray Background From Windows 95; ID Number Q154170) and can proceed with the @SAY. What was happening originally with the @SAY is the background of the printed text was printing as the color of the active window background, so basically all you need to do is change the background color of your active form to white and the problem goes away (This will work as long as you can afford to set your form color to white, at least while printing).
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform