Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #6  
Antiguo 03-09-2012
Avatar de ingabraham
ingabraham ingabraham is offline
Miembro
 
Registrado: ago 2007
Posts: 614
Poder: 20
ingabraham Va por buen camino
Unhappy PrintControl no me imprime el tamaño normal

utilizo delphi 7


quiero que me imprima mi tamaño normal de una imagen, el cual contiene unos label y otras imagenes que pueden ser variables.

quiero que me lo imprima tal y cual como me lo visualiza, porque me lo esta imprimiendo pequeñito.

mi siguiente codigo es:

Código Delphi [-]

uses Printers;

procedure PrintControl(aPrn: TPrinter; aWinControl: TWinControl; const aPosX, aPosY: Integer);
var
  Bmp: TBitmap;
  hdcSrc: HDC;
begin
  Bmp:= TBitmap.Create;
  try
    Bmp.Width:= aWinControl.Width;
    Bmp.Height:= aWinControl.Height;
    hdcSrc:= GetWindowDC(aWinControl.Handle);
    try
      BitBlt(Bmp.Canvas.handle, 0, 0, Bmp.Width, Bmp.Height, hdcSrc, 0, 0, SRCCOPY)
    finally
      ReleaseDC(aWinControl.Handle, hdcSrc)
    end;
    aPrn.Canvas.Draw(aPosX, aPosY, Bmp);
  finally
    Bmp.Free
  end
end;


procedure TTarjetaPuntos.SpeedButton11Click(Sender: TObject);
var
  Printer: TPrinter;
begin

   SpeedButton11.Visible   := false;


  Printer:= TPrinter.Create;
  try
    Printer.BeginDoc;
    //...
    PrintControl(Printer, GroupBoxTarjeta1, 100, 50);
    //...
    Printer.EndDoc;
  finally
    Printer.Free;
  end;

   SpeedButton11.Visible   := true;

end;
__________________
Enseñar es la virtud de un sabio.

Última edición por ingabraham fecha: 03-09-2012 a las 19:37:56.
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
quiero abrir una base datos alex2112 Firebird e Interbase 47 30-08-2010 22:32:45
Imprimir pudiendo seleccionar la impresora bbjb Impresión 2 20-08-2010 08:50:36
Seleccionar Impresora ASAPLTDA Impresión 0 22-04-2009 00:56:45
Seleccionar Impresora chrids506 Impresión 0 31-05-2006 15:32:09
Seleccionar impresora pdf david duarte Impresión 1 24-04-2006 22:54:26


La franja horaria es GMT +2. Ahora son las 01:55:56.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi