Delphi - Imprimir

 
Vista:

Imprimir

Publicado por Pablo (1 intervención) el 04/11/2001 14:55:04
Hola. Quiero imprimir una form y para ello uso la propiedad print, pero me imprime solo lo que aparece en pantalla. Yo quería imprimirla entera. Como hago?? Si la pongo más pequeña y le pongo que la imprima a todo lo que de la página, la calidad es malísima. No se como hacerlo. Gracias
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Imprimir

Publicado por vte (108 intervenciones) el 05/11/2001 20:30:13
Esto es de Borland, ¿Si quieres probarlo?

A Better Way To Print a Form - by Borland Developer Support Staff
Technical Information Database
TI1412D.txt - A Better Way To Print a Form
Category :Printing
Platform :All-32Bit
Product :All32Bit,

Description:

The following TI details a better way to print the contents of
a form, by getting the device independent bits in 256 colors
from the form, and using those bits to print the form to the
printer.

In addition, a check is made to see if the screen or printer
is a palette device, and if so, palette handling for the device
is enabled. If the screen device is a palette device, an additional
step is taken to fill the bitmap's palette from the system palette,
overcoming some buggy video drivers who don't fill the palette in.

Note: Since this code does a screen shot of the form, the form must
be the topmost window and the whole from must be viewable when the
form shot is made.


unit Prntit;

interface

uses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics,
Controls, Forms, Dialogs, StdCtrls, ExtCtrls;

type
TForm1 = class(TForm)
Button1: TButton;
Image1: TImage;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.DFM}

uses Printers;

procedure TForm1.Button1Click(Sender: TObject);
var
dc: HDC;
isDcPalDevice %3
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar