Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Varios (https://www.clubdelphi.com/foros/forumdisplay.php?f=11)
-   -   Error "printing in progress" (https://www.clubdelphi.com/foros/showthread.php?t=27773)

jmlifi 30-11-2005 15:28:06

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;

Coco 30-11-2005 20:58:14

que valor tiene s cuando ingresa a la funcion,porque si tiene un valor <> '' nunca va a asignarle el valor 'LANIER LD135 PCL 5e'.

Saludos.

jmlifi 01-12-2005 09:14:52

s tiene 'LANIER LD135 PCL 5e' cuando ingresa en la función


La franja horaria es GMT +2. Ahora son las 15:41:53.

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