Ver Mensaje Individual
  #14  
Antiguo 23-09-2004
Avatar de marcoszorrilla
marcoszorrilla marcoszorrilla is offline
Capo
 
Registrado: may 2003
Ubicación: Cantabria - España
Posts: 11.221
Reputación: 10
marcoszorrilla Va por buen camino
A ver si esto te sirve:
Código Delphi [-]
 
 function GetPageWidth: Integer;
 begin
   Result := GetDeviceCaps(Printer.Handle, PHYSICALWIDTH)
 end;
 
 function GetPageHeight: Integer;
 begin
   Result := GetDeviceCaps(Printer.Handle, PHYSICALHEIGHT)
 end;
 
 function GetPageOffsetLeft: Integer;
 begin
   Result := GetDeviceCaps(Printer.Handle, PHYSICALOFFSETX)
 end;
 
 function GetPageOffsetRight: Integer;
 begin
   Result := GetPageWidth - GetPageOffsetLeft - GetDeviceCaps(Printer.Handle, HORZRES)
 end;
 
 function GetPageOffsetTop: Integer;
 begin
   Result := GetDeviceCaps(Printer.Handle, PHYSICALOFFSETY)
 end;
 
 function GetPageOffsetBottom: Integer;
 begin
   Result := GetPageHeight - GetPageOffsetTop - GetDeviceCaps(Printer.Handle, VERTRES)
 end;
 
 function GetPixelsPerInchX: Integer;
 begin
   Result := GetDeviceCaps(Printer.Handle, LOGPIXELSX)
 end;
 
 function GetPixelsPerInchY: Integer;
 begin
   Result := GetDeviceCaps(Printer.Handle, LOGPIXELSY)
 end;
 
 procedure TConfImpresora.Button1Click(Sender: TObject);
 begin
 AnchoPagina.text:=inTtostr(GetPageWidth);
 AltoPagina.text:=inTtostr(GetPageHeight);
 MargenIz.text:=inTtostr(GetPageOffsetLeft);
 MargenDe.text:=inTtostr(GetPageOffsetRight);
 MargenTop.text:=inTtostr(GetPageOffsetTop);
 MargenBottom.text:=inTtostr(GetPageOffsetBottom);
 PiXelsPinchX.text:=inTtostr(GetPixelsPerInchX);
 PiXelsPinchY.text:=inTtostr(GetPixelsPerInchY);
 end;

Un Saludo.
__________________
Guía de Estilo de los Foros
Cita:
- Ça c'est la caisse. Le mouton que tu veux est dedans.
Responder Con Cita