Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dot Matrix print question

Status
Not open for further replies.

123rest

MIS
Jun 16, 2000
15
IE

Hi all, when I print to a dox matrix printer, I use the following,

var
file_ptr: textfile;
begin
assignfile(file_ptr,'LPT1:');

try
assignfile(file_ptr,'LPT1:');
except
On E: Eprinter do
begin
Showmessage('Invalid Printer');
Exit;
end;
end;



However I would like to print to another dotmatrix printer on the
network, which has been captured, and resides at LPT2,


assignPRN(file_ptr);
{$I-}
rewrite(file_ptr);
{$I+}

if IOResult = 0 then
else
begin
assignfile(file_ptr,'LPT2:');
{$I-}
rewrite(file_ptr);
{$I+}

end;

The problem is Delphi does'nt see the printer, any idea's, suggestions,
I might try..

Cheers..

 
Try using TPrintDialog to actually select the active printer first and then use the synatx that is in Delphi Help for AssignPRN. This should work.

Roger
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top