Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using DOS printer control command in VFP
Message
From
05/06/2001 19:50:36
 
 
To
04/06/2001 23:33:10
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00513473
Message ID:
00515497
Views:
21
>I made the printer as Generic/Text printer.
>and send the prg code for printing but never printing right way but just print code itself.
>

David,

try this:

SET PRINTER ON
SET CONSOLE OFF
CrLf = CHR(13) + CHR(11)

??? " Cust No: "
??? CHR(27)+'!'+chr(48) && double-width+height
??? mCustNo + CrLf

??? CHR(12) && FormFeed

SET PRINTER OFF
SET CONSOLE ON

using ??? sends the output DIRECTLY to the printer. You don't actually (in this example) need the SET PRINTER ON but if you are doing @say's you do. Note that you should have PRINT SPOOLING for this GENERIC printer turned OFF in Windows. Otherwise, Windows might hang on to the job until you exit Foxpro. If you still get the "codes" printing on the printer with this example, then perhaps your printer's emulation is set incorrectly? I use precisely this approach to control a Lexmark laser printer and and Epson dot-matrix and it works just fine under all versions of Windows.

-Arne
arne@synercom-edi.com "There are no absolutes but this one."
President, synercom/edi - Event Ticketing Solutions
Previous
Reply
Map
View

Click here to load this message in the networking platform