Saber, Tipo de impresora?

Saber, Tipo de impresora?

Postby noe aburto » Thu Jul 18, 2013 11:06 pm

Saludos.

Tengo un catalogo donde registro las impresoras usadas, en el hay matriciales, laser y de tinta, ello para poder decidir que reportes se van a cada una.

Mi duda: como saber por medio de FWH o xH el tipo de impresora, solo con saber si la seleccion es: matriz, laser o tinta.
por medio de algun parametro.
Noé Aburto Sánchez
Tec. Prog. de Sistemas. -Morelia, Mich. México.
fwh 20.06, Harbour 3.2.0, bcc 7.4
TsBrowse 9.0, TsButton 7.0, xEdit 6.1
naburtos@gmail.com, noeaburto67@hotmail.com
User avatar
noe aburto
 
Posts: 418
Joined: Wed Nov 26, 2008 6:33 pm
Location: Morelia, Mich. Mexico.

Re: Saber, Tipo de impresora?

Postby MarioG » Fri Jul 19, 2013 11:31 pm

Noe;
xHarbour dispone de esta funcion:
    GetPrinters()
    Retrieves information about available printers.
    Syntax
    GetPrinters( [<lPortInfo>], [<lLocalPrinters>] ) --> aPrinterInfo

    Arguments
    <lPortInfo>
    The default value for <lPortInfo> is .F. (false). If set to .T. (true), the function includes port information in the returned array.
    <lLocalPrinters>
    The default value for <lLocalPrinters> is .F. (false). If set to .T. (true), the function returns only information for local printers. Return
    The function returns a one- or two-dimensional array. If <lPortInfo> is .F. (false), a one-dimensional array is returned. Each element contains a character string with the name of an available printer. If <lPortInfo> is .T., each element of the returned array is an array of four elements, holding character strings with additional printer information:
    Array elements for additional printer information Element Description
    1 Printer name
    2 Port name
    3 Printer type (e.g. Local/Network)
    4 Printer driver

    Description
    The GetPrinters() function obtains information about printers that are currently available. If it is called without arguments, the function returns the names of all available printers. The list can be reduced to local printers only by specifying .T. (true) for <lLocalPrinters>. Additional information about port and printer driver can be retrieved when <lPortInfo> is set to .T. (true)

Lo que yo hago con esta funcion, es armar un xBrowse que muestra 1, 2 y 3 (arriba descriptos). De manera que el usuario realiza una multi seleccion, donde desea que se imprima tal o cual documento.
Luego la selección, la guardo en un archivo Hash_ini (tambien de xHarbour).
De manera que si alguna impresora se cambia, solo hay que realizar una nueva selección.

Desconozco si ambas funciones existen en Harbour

Saludos
Resistencia - "Ciudad de las Esculturas"
Chaco - Argentina
User avatar
MarioG
 
Posts: 1380
Joined: Fri Oct 14, 2005 1:28 pm
Location: Resistencia - Chaco - AR

Re: Saber, Tipo de impresora?

Postby cnavarro » Wed Jul 24, 2013 5:17 pm

Noe
En FoxPro creo que hay una funcion PrtInfo (sacado de google)

PRTINFO

SI prtinfo(7,nombre_impresora)=8 //La impresora es matricial pues
indica tipo de alimentacion por TRACCION

Espero te sirva
Saludos
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6504
Joined: Wed Feb 15, 2012 8:25 pm
Location: España


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 44 guests