Problem sending Control Codes To Printer In Delphi 4
If you want to do the same as the Basic code above, then it will
> print "EPSON TEST PROGRAM FOR CASH DRAWER"
> LPRINT "THIS IS AN EPROM TEST"
> LPRINT "OPENS THE CASH DRAWER"
> LPRINT " "
> Please help me. How do you send control codes in Delphi 4 to the printer and
> have them treated as control codes.
be something like this:
f : TextFile;
if (frmSales.sCashDrawerString = '') or (frmSales.iCashDrawer = -1)
With that example the printing is done in the old DOS style, and all
the Esc-commands will go to the printer. But you can't use anything
related to Windows Printing System. So Printer.PrinterIndex to select
the printer etc. are useless.
As someone suggested, PassThrough printing, using WINAPI Escape
(ExtEscape) function is another way to make Esc sequences to go
through to the printer.