Imprimir hacia una ETIQUETADORA ne .NET
Publicado por vlg1971 (48 intervenciones) el 24/10/2005 06:56:43
HOLA mi pregunta es como puedo imprimir hacia una etiquetadora ELTRON en .NET, en vb6 lo hacia de la siguiente manera:
INICIO DE IMPRESION ETIQUETADOR
'DETECCION DE IMPRESORA PREDETERMINADA
Dim tPrinter As Printer
'Localizacion de etiquetadora y asignacion de puerto
For Each tPrinter In Printers
If tPrinter.DeviceName = "Eltron 2746" Then
Set Printer = tPrinter
Exit For
End If
Next
cPort = Printer.Port
' hay que quitar los dos puntitos del final si estan (dan problemas)
If Right(cPort, 1) = ":" Then
cPort = Left(cPort, Len(cPort) - 1)
End If
Print #nFicSal, "FR" + Chr(34) + "ETIQ_V~1" + Chr(34)
Print #nFicSal, "?"
Print #nFicSal, Trim(DatosEt(1)) 'DESCRIPCION
Print #nFicSal, Trim(DatosEt(0)) 'CODIGO
Print #nFicSal, Trim(DatosEt(2)) 'PROVEEDOR
Print #nFicSal, Val(DatosEt(3)) 'CANTIDAD
Print #nFicSal, Trim(DatosEt(4)) 'FECHA
Print #nFicSal, "P1"
Print #nFicSal, Chr(12)
EN .NET como lo hago, se que existe el printpreviewcontrol y el printdocument ¿lo tengo que hace con estos controles? o por lo contrario hay algun metodo que me permita realizar este procedimiento igual que lo hacia en VB6
MUCHAS GRACIAS
INICIO DE IMPRESION ETIQUETADOR
'DETECCION DE IMPRESORA PREDETERMINADA
Dim tPrinter As Printer
'Localizacion de etiquetadora y asignacion de puerto
For Each tPrinter In Printers
If tPrinter.DeviceName = "Eltron 2746" Then
Set Printer = tPrinter
Exit For
End If
Next
cPort = Printer.Port
' hay que quitar los dos puntitos del final si estan (dan problemas)
If Right(cPort, 1) = ":" Then
cPort = Left(cPort, Len(cPort) - 1)
End If
Print #nFicSal, "FR" + Chr(34) + "ETIQ_V~1" + Chr(34)
Print #nFicSal, "?"
Print #nFicSal, Trim(DatosEt(1)) 'DESCRIPCION
Print #nFicSal, Trim(DatosEt(0)) 'CODIGO
Print #nFicSal, Trim(DatosEt(2)) 'PROVEEDOR
Print #nFicSal, Val(DatosEt(3)) 'CANTIDAD
Print #nFicSal, Trim(DatosEt(4)) 'FECHA
Print #nFicSal, "P1"
Print #nFicSal, Chr(12)
EN .NET como lo hago, se que existe el printpreviewcontrol y el printdocument ¿lo tengo que hace con estos controles? o por lo contrario hay algun metodo que me permita realizar este procedimiento igual que lo hacia en VB6
MUCHAS GRACIAS
Valora esta pregunta


0