Tema: Impresora
Ver Mensaje Individual
  #4  
Antiguo 19-09-2005
serhasae serhasae is offline
Miembro
 
Registrado: jun 2004
Ubicación: España
Posts: 117
Reputación: 20
serhasae Va por buen camino
Prueba este codigo y dime que tal, me lo paso un amigo lo que pasa es que no tengo tinta en mi impresora para probarlo.

var
pcrDevice : array[0..255] of char;
pcrDriver : array[0..255] of char;
pcrPort : array[0..255] of char;
lDMode : THandle;
varPDMode : PDEVMODE;
begin
Printer.PrinterIndex := Printer.PrinterIndex;
Printer.GetPrinter(pcrDevice, pcrDriver, pcrPort, lDMode);
if (lDMode <> 0) then
begin
varPDMode := GlobalLock(lDMode);
if (varPDMode <> nil) then
begin
varPDMode^.dmFields := (varPDMode^.dmFields or DM_PAPERSIZE or DM_PAPERWIDTH or DM_PAPERLENGTH);
varPDMode^.dmPaperSize := DMPAPER_USER;
varPDMode^.dmPaperWidth := 100;
varPDMode^.dmPaperLength := 100;
varPDMode^.dmFields := (varPDMode^.dmFields or DMBIN_MANUAL); varPDMode^.dmDefaultSource := DMBIN_MANUAL; GlobalUnlock(lDMode); end;
end;
end;

Última edición por serhasae fecha: 29-09-2005 a las 00:57:47.
Responder Con Cita