Entrar
¿Nuevo usuario? Inscribirme
guvoaII · GUVOA Visual Object Español
? ¿Ya estás suscrito? Entra a Yahoo!

Consejos

¿Sabías que...?
Podés cambiar el orden de los mensajes. Simplemente hacé clic en el enlace de columna fecha. Tus preferencias se guardarán, por lo tanto no necesitarás hacerlo otra vez cuando vuelvas a entrar.

Mensajes

  Mensajes Ayuda
Avanzado
Seleccion de impresora   Lista de mensajes  
Responder | Reenviar Mensaje #2139 de 2799 |
RE: [guvoaII] Seleccion de impresora

Probá con esto que hace un tiempo me pasó Biassone:

 

FUNCTION GetPrinterList() AS ARRAY     // Retorna un array de printers instaladas
        LOCAL aPrinters AS ARRAY
        LOCAL i, nSize AS DWORD
        LOCAL nPrintLevel, nPrintSize AS DWORD
        LOCAL ptrSave AS PTR
        LOCAL oPrintInfo4 AS _winPRINTER_INFO_4
        LOCAL oPrintInfo5 AS _winPRINTER_INFO_5
 
        aPrinters := {}
        IF WindowsNT()
                nPrintLevel := 4
                nPrintSize := _SizeOf(_winPRINTER_INFO_4)
                EnumPrinters(PRINTER_ENUM_LOCAL + PRINTER_ENUM_CONNECTIONS,NULL_PSZ, nPrintLevel, NULL_PTR, 0, @nSize, @i)
                IF nSize != 0
                        ptrSave := oPrintInfo4 := MemAlloc(nSize)
                        IF EnumPrinters(PRINTER_ENUM_LOCAL +PRINTER_ENUM_CONNECTIONS, NULL_PSZ, nPrintLevel, oPrintInfo4, nSize, @i,@nSize)
                                FOR i := 1 UPTO nSize
                                        AAdd(aPrinters,Psz2String(oPrintInfo4.pPrinterName))
                                        oPrintInfo4 := PTR(_CAST, DWORD(_CAST,oPrintInfo4) + nPrintSize)
                                NEXT i
                        ENDIF
                        MemFree(ptrSave)
                ENDIF
        ELSE
                nPrintLevel := 5
                nPrintSize := _SizeOf(_winPRINTER_INFO_5)
                EnumPrinters(PRINTER_ENUM_LOCAL, NULL_PSZ, nPrintLevel,NULL_PTR, 0, @nSize, @i)
                IF nSize != 0
                        ptrSave := oPrintInfo5 := MemAlloc(nSize)
                        IF EnumPrinters(PRINTER_ENUM_LOCAL +PRINTER_ENUM_NETWORK, NULL_PSZ, nPrintLevel, oPrintInfo5, nSize, @i, @nSize)
                                FOR i := 1 UPTO nSize
                                        AAdd(aPrinters,Psz2String(oPrintInfo5.pPrinterName))
                                        oPrintInfo5 := PTR(_CAST, DWORD(_CAST,oPrintInfo5) + nPrintSize)
                                NEXT i
                        ENDIF
                        MemFree(ptrSave)
                ENDIF
        ENDIF
RETURN aPrinters

 

FUNCTION WindowsNT() AS LOGIC     //   Devuelve True si es Windows NT
        LOCAL oVer IS _winOSVERSIONINFO
 
        oVer.dwOSVersionInfoSize := _Sizeof(_winOSVERSIONINFO)
        GetVersionEx(@oVer)
 
        IF oVer.dwPlatformId == VER_PLATFORM_WIN32_NT
                RETURN TRUE
        ELSE
                RETURN FALSE
        ENDIF
 

 

 

 

Gerardo J. Biagiotti

Analista de Sistemas

 

Mail:

gjbiagiotti@...

gjbiagiotti@...

Messenger

gerardo_biagiotti@...

 

 

De: guvoaII@... [mailto:guvoaII@...] En nombre de argensur
Enviado el: Martes, 20 de Noviembre de 2007 07:12 p.m.
Para: guvoaII@...
Asunto: [guvoaII] Seleccion de impresora

 

Hola amigos.

 

Como se selecciona una impresora instalada?. Cual es el equivalente a la clase "OpenDialog" pero para seleccionar impresora.

Estoy viendo la clase "PrintingDevice" pero su metodo "Setup" me muestra el cuadro de dialogo de configuración de impresora.

 

Hasta luego.

 

--------------------------------------------------------------
Fernando Piazza
Coronel Suárez
República Argentina
e-mail: soporte@...
Matrícula Nº 801 CPCIBA Ley 13016



__________ Información de NOD32, revisión 2673 (20071120) __________

Este mensaje ha sido analizado con NOD32 antivirus system
http://www.nod32.com



Mié, 21 de Nov, 2007 3:51 pm

gjbiagiotti
Sin conexión Sin conexión
Enviar correo Enviar correo

Reenviar Mensaje #2139 de 2799 |
Desplegar mensajes Autor Ordenar por fecha

Hola amigos. Como se selecciona una impresora instalada?. Cual es el equivalente a la clase "OpenDialog" pero para seleccionar impresora. Estoy viendo la clase...
argensur
psi_sistemas
Sin conexión Enviar correo
20 de Nov, 2007
10:16 pm

Probá con esto que hace un tiempo me pasó Biassone: FUNCTION GetPrinterList() AS ARRAY // Retorna un array de printers instaladas LOCAL aPrinters AS...
Gerardo J. Biagiotti
gjbiagiotti
Sin conexión Enviar correo
21 de Nov, 2007
3:52 pm
Avanzado

Copyright © 2009 Yahoo! de Argentina S.R.L. Todos los derechos reservados.
Política de privacidad - Condiciones del Servicio - Reglas de la comunidad de Yahoo! - Ayuda