Главная страница | назад

Article #18811: How do I Print the output of a Progam.

 Question and Answer Database

FAQ3811C.txt   How do I Print the output of a Progam.
Category   :Miscellaneous
Platform    :Win95/NT
Product    :   All32Bit

How do I print the output of a progam, without using the VCL TPrinter object?

There are two methods that can be used to print the output of a program
to a printer.

1> Redirect the output of a console mode application to a text file.
   This can be done by typing "Myfile.exe >> out.txt" from a dos prompt.
   Where Myfile.exe is the name of your executable and out.txt is the 
   name of the output file to be created.
   Now open out.txt in Notepad.exe and select File | Print

2> Copy the image of the window and Print it.
   You can use this if Your printer supports graphical printing.
   Run your program, with the Window in focus press "Alt & PrintScreen"
   at the same time. This will copy the window to the clipboard. Now
   open up Mspaint.exe and Paste the image in.
   To print select File | Print


Last Modified: 01-SEP-99