Ver Mensaje Individual
  #1  
Antiguo 30-11-2005
jmlifi jmlifi is offline
Miembro
 
Registrado: abr 2005
Posts: 188
Reputación: 20
jmlifi Va por buen camino
Error "printing in progress"

utilizo delphi 7 y este es el codigo que tengo:

procedure ActivaImpresora(const s: string);
var
Device, Name, Port : array[0..100] of char;
DevMode : THandle;
a :string;
q : integer;
begin
with printer do begin
if s<>'' then begin s='LANIER LD135 PCL 5e'
a:=printers.Names[0]; //me devuelve vacio a='' prueba realizada
printer.PrinterIndex := printers.IndexOf(s); // AQUI DA EL ERROR
end
else
PrinterIndex := -1;
GetPrinter(Device, Name, Port, DevMode);
SetPrinter(Device, Name, Port, 0);
end;
end;

Última edición por jmlifi fecha: 30-11-2005 a las 18:17:18.
Responder Con Cita