Quote:
> Ok, Maybe this sounds too simple, but how do you print your output screen to the print spooler with
> Pascal 1.5 for Windows? I have found the print.pas unit, yet, I still cannot get it to work. Thanks for the
> help.
Joseph,
Why don't you assign the output of the file to the printer?
Ex.
Program Print;
Uses Wincrt;
Var
OutputFile : Text;
Procedure Print;
Begin
Assign(OutputFile,"LPT1");
Rewrite(OutputFile);
End;
Procedure CloseFile; {This procedure very inportant!}
Begin
Writeln(OutputFile,#12);
Close(OutputFile);
End;
Begin
Print;
Writeln("This is a test to see if this prints!");
Writeln(OutputFile,"This is a test to see if this prints!");
CloseFile;
End.
The closing procedure is very important, because if you do not close the
file after, you may lock up your printer. The #12 in the source code is
ascii code to form feed the paper.
Regards,
Scott Diorio
--
!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*
* John Scott Diorio !
! Webmaster, ALL SPUN-UP IN THE WEB *
* Visit us at http://www.all-spun-up.com !
* !
! Phone: (909) 350-3304 *
* Fax: (909) 350-3304 !
!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*