How do I printer user output screen 
Author Message
 How do I printer user output screen

I am using TP6. Will some please tell me how do get a printer copy of a
programs output that appears on the User Screen.
No keyboard command will work. What code must I include in the  the user
program? I have searched all my Pascal books and find no help. -------Thanks



Fri, 20 Aug 2004 01:16:32 GMT  
 How do I printer user output screen
Not sure if that's what you are looking for but
for a text screen Press "Alt"+"PrintScreen";
for a graphics screen you will have to run a
program called "graphics.com" that is included
with all MSDOS versions, before you start the
Program you want to print from.
Then the same "Alt"+"PrintScreen" will print the
graphics on screen.
Hope this helps.


Quote:
> I am using TP6. Will some please tell me how do get a printer copy of a
> programs output that appears on the User Screen.
> No keyboard command will work. What code must I include in the  the user
> program? I have searched all my Pascal books and find no
help. -------Thanks




Fri, 20 Aug 2004 03:16:42 GMT  
 How do I printer user output screen

Quote:
> I am using TP6. Will some please tell me how do get a printer copy of a
> programs output that appears on the User Screen.
> No keyboard command will work. What code must I include in the  the user
> program? I have searched all my Pascal books and find no help.

  If program's output realise *only* via Write/WriteLn procedure than:

========================
1. Use redirection to get text file of program's output:
      prg1.exe >screen1.txt
And then load created text file in your favorite editor that is capable to
print it (actually for win-printers :)

========================
2. Use redirection to get a printer copy of program's output too:
      prg1.exe >prn
or
      prg1.exe >lpt2

========================
3. Re-assign "Output" variable to desired location:

Program Example1(Input, Output);
{Some code}
BEGIN
  Assign(Output, 'LPT1');
  ReWrite(Output);
  {Some code}
  WriteLn(#12); {to get out current paper-list from printer}
  Close(Output);
END.

--
   Varjonov Konstantin       varkos^mail.ru      http://ghsrl.newmail.ru



Fri, 20 Aug 2004 03:40:17 GMT  
 How do I printer user output screen


at Sun, 3 Mar 2002 09:16:32 :-

Quote:
>I am using TP6. Will some please tell me how do get a printer copy of a
>programs output that appears on the User Screen.
>No keyboard command will work. What code must I include in the  the user
>program? I have searched all my Pascal books and find no help.

You need to say whether or not you are running under Windows - for this
sort of question, it is best to specify the system.  Also whether the
program is being within from the Borland IDE, or separately; it *might*
make a difference.

If not using Windows : the PrintScreen key should work, and you can test
it before starting TP6.  Check also that the DOS Print command works.

  "For programmed Print Screen, use
        asm ; int 5 ; end {Osmo} ;
   in BP7/TP7 ; or, in earlier TP, use
        Intr(5, Regs) ;
   (the content of Regs is irrelevant)."

If standard output is being used, Ctrl-P should cause future screen
output to be duplicated on a printer (^P again to stop).

Note that page printers cannot print until the page is completed; you
may need to sent a Form Feed = ^L = #12.

Note that a postscript printer will not accept plain text.

If using Windows : PrintScreen sends the whole screen to the Clipboard,
and Alt-PrintScreen sends the current window.  These can be sent to a
graphics-capable printer by a graphics program.

--

  <URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/&c., FAQqy topics & links;
  <URL:http://www.merlyn.demon.co.uk/clpb-faq.txt> Pedt Scragg: c.l.p.b. mFAQ;
  <URL:ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip> Timo Salmi's Turbo Pascal FAQ.



Fri, 20 Aug 2004 21:46:44 GMT  
 How do I printer user output screen



Quote:
> I am using TP6. Will some please tell me how do get a printer copy of a
> programs output that appears on the User Screen.
> No keyboard command will work. What code must I include in the  the
user
> program? I have searched all my Pascal books and find no
help. -------Thanks


If you write what you want to print to a file first you can use notepad
(or some other program) to print it from within your program.

{$M 8192,0,0}
uses Dos;
procedure PrintFile (Filename : string);
begin
  SwapVectors;
  Exec ('c:\windows\notepad.exe', '/p '+Filename);
  SwapVectors;
end;

This solves many problems such as what kind of (default) printer, or Win
2K not allowing access to the priner.

--
Femme



Sat, 21 Aug 2004 21:51:12 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Send the output screen to the printer, Turbo Pascal for Windows

2. Output to screen AND printer

3. outputting direct to printer instead of screen - TPW 1.5

4. How to print user screen output?

5. Clearing the User Output Screen

6. reading binary file and outputting to standard output (screen)

7. blank screen when doing graphics in tp for dos 7

8. Different output on different printer ???

9. Formatting Printer Output

10. DbGrid and output to a printer

11. Output to printer

12. Need Hhheeeeellllllllppppppppppppp on doing Windows screen saver.

 

 
Powered by phpBB® Forum Software