<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18852">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>
<DIV><FONT size=2>I can't send a tab setting to the printer </FONT></DIV>
<DIV>The routine works with a memo but fPrn.Handle gives and error.</DIV>
<DIV>Something to do with fPrn and system.text </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>procedure TfMain.puExpListClick(Sender:
TObject);<BR>var<BR> fPrn: system.text;<BR> TabArray :
array[0..4] of integer;<BR>begin<BR> TabArray[0] := 350;// div
DialogUnitsX; //Tab Positions<BR> TabArray[1] := 380; //div
DialogUnitsX;<BR>
begin<BR> with Printer.Canvas do
begin<BR>
PrinterSetupDialog1.execute;<BR>
Font.Name := 'Courier
New';<BR>
Font.size :=
14;<BR>
AssignPrn(fPrn);<BR>
Rewrite(fPrn);<BR>
SendMessage(fPrn,EM_SETTABSTOPS,2,LongInt(@TabArray)) ; //<FONT
color=#ff0000> This line does not work</FONT></FONT></DIV>
<DIV><FONT
size=2>
SendMessage(fPrn.Handle,EM_SETTABSTOPS,2,LongInt(@TabArray)) ; <FONT
color=#ff0000>//This gives an error.</FONT></FONT></DIV>
<DIV> //
SendMessage(memo.Handle,EM_SETTABSTOPS,2,LongInt(@TabArray)) ; <FONT
color=#ff0000>//This works on the memo.</FONT></DIV>
<DIV><FONT size=2>
end;<BR> end<BR>
dm.tblExpJob.First;<BR>
begin <FONT color=#ff0000>//
Heading<BR></FONT>
with Printer.Canvas do
begin<BR>
Font.size :=
12;<BR>
WriteLn(fPrn,#10+#10);<BR>
WriteLn(fPrn,'
'+dm.tblData['Desc']+#13+#10);<BR>
Font.Size :=
10;<BR>
end;<BR> end</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>etc</FONT></DIV>
<DIV><FONT size=2> </DIV>
<DIV>
WriteLn(fPrn,'
'+dm.tblExpJob.FieldByName('Date').AsString<BR>
+'
'+dm.tblExpJob.FieldByName('Desc').AsString<BR>
+' '+#9+dm.tblExpJob.FieldByName('Person').AsString) <FONT
color=#ff0000>// Trying to format the Person on
TAB</FONT><BR>
CloseFile(fPrn);</DIV>
<DIV> </DIV></FONT></FONT></DIV></BODY></HTML>