![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
|||||||
| Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
|
Herramientas | Buscar en Tema | Desplegado |
|
#1
|
|||
|
|||
|
stasus impresora
Ayer muy amablemente delphi.com.ar, me dio una posile solución para saber el estado de la impresora antes de imprimir.
El codigo propuesto no funciona me da error interno de memoria. code:-------------------------------------------------------------------------------- function PrinterStatus : integer; asm mov ah, 2 // function 2 - returns status of port mov dx, 0 // lpt1 = 0, lpt2 = 1 etc int $17 // status in ah mov al, ah and eax, $FF // status now in eax with top 24 bits cleared end; const PrinterCodes : array [0..7] of string = ('printer timed-out', 'unused', 'unused', 'I/O error', 'printer selected', 'out of paper', 'printer acknowedgment', 'printer not busy'); procedure TForm1.Button1Click(Sender: TObject); var L,P : integer; begin P := PrinterStatus; //status of printer in P ListBox1.Clear; for L := 0 to 7 do if P and (1 shl L) <> 0 then ListBox1.Items.Add (PrinterCodes [L]); end; Tambien Hizo referencia a crear una instancia de TPrinterStatus y utilizar sus propiedades. ¿ Me podias decir como concretamente como se crea esta instancia y como poder utilizar sus propiedades.? Saludos y gracias anticipadas. BOtones67 Última edición por botones67 fecha: 22-08-2003 a las 09:18:07. |
|
|
|