TIP: Click on subject to list as thread! ANSI
echo: delphi
to: FRED BURGESS
from: FRANCOIS PIETTE
date: 1997-09-07 10:22:00
subject: Printing a Form type

Salut Fred Burgess !
Dans un message de Fred Burgess dat‚ du 04 Sep 97  19:53:00 il ‚tait dit:
  FB> Ok, here is a question that I haven't seen in here, so ...I'm working
  FB> on a program that will need to print out a receipt. And I'm alittle
  FB> confused on this feature. I can print the program screen, but it's
  FB> notwhat I need.Setting would look like a standard receipt:
  FB> _______________________________________________________________________
  FB>                            Company Name
  FB>                          Company  Address
  FB>                        City, State Zip Code        Customer # : 1
  FB>                             Phone #'s              Invoice  # : 001
  FB> _______________________________________________________________________
You have to use the Printer object which is build-in and automatically 
created at run-time. You can do something like this:
Printer.BeginDoc;
LeftMargin := Printer.PageWidth div 10;
TopMargin  := Printer.PageHeight div 10;
InterLine  := Printer.PageHeight div 60;
Printer.Canvas.MoveTo(LeftMargin, TopMargin);
Printer.Canvas.LineTo(Printer.PageWidth - LeftMargin, TopMargin);
Printer.Canvas.TextOut(LeftMargin + (Printer.PageWidth div 2), 
                       TopMargin + LineHeight, 
                       'Comapny Name');
{ more.... }
Printer.EndDoc;
Amiti‚s,
{-Francois Piette-}
francois.piette@ping.be
http://www.rtfm.be/fpiette
--- SvFido 1.32
---------------
* Origin: OverByte BBS (Embourg-Belgium) 32-4-3651395 VFC/V34+ (2:293/2202)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.