MAXIUM
11-02-2008, 17:06:06
Hola, quisiera saber que tipo de puerto usa la impresora determinada. Uso el siguiente código pero al mostara el tipo de puerto me aparece en blanco.
Uses Printers;
Type
TPrinterDevice = Class Driver, Device, Port: String;
TForm1.Button1Click(Sender:TObject);
Begin
// Para obtener el nombre de la impresora.
Label1.Caption:= TPrinterDevice(Printer.Printers.Objects[Printer.PrinterIndex].Device;
// Para obtener el tipo de puerto.
Label2.Caption:= TPrinterDevice(Printer.Printers.Objects[Printer.PrinterIndex].Port;
End;
Uses Printers;
Type
TPrinterDevice = Class Driver, Device, Port: String;
TForm1.Button1Click(Sender:TObject);
Begin
// Para obtener el nombre de la impresora.
Label1.Caption:= TPrinterDevice(Printer.Printers.Objects[Printer.PrinterIndex].Device;
// Para obtener el tipo de puerto.
Label2.Caption:= TPrinterDevice(Printer.Printers.Objects[Printer.PrinterIndex].Port;
End;