 |
|
 |
daserca Level: Guest

|
printing in differents printers from VB
Hi everyone:
I need some help with a VB code.
I am doing some printings from VBasic, and work with an Epson LX-300 with good results for my purpose. But when I tried to use my program with an Epson LX-300+ it printed with different font and size, and all my work went to the garbage.
I tried with some ESC commands but did't work, please if anybody can help me to configure any Epson printer from VBasic and print my text with no changes in the font and size, I wil very grateful
My code is:
Open "lpt1" For Output As #1
Print #1, Chr$(27) & Chr$(107) & "1" 'antes 10
'Print #1, Chr$(27) & "2"
'Print #1, Chr$(27) & Chr$(69);
Print #1, Tab(68); "BANCO SOLIDARIO S.A."
Print #1, Tab(65); lblRUC.Caption & " " & txtRUC.Text; Spc(3); lblBanco.Caption & " " & txtSucursal.Text & " " & txtCajero.Text & " " & txtSecuencial.Text; Spc(13); txtAleatorio.Text
Print #1, Tab(84); lblCajero.Caption & " " & txtNomCajero.Text
Print #1, Chr$(27) & "2"
Close #1
This is the text I want to preserve in any Epson Printer
Printer.FontName = "Arial Black"
Printer.FontSize = 10
Printer.Print Tab(54); "BANCO SOLIDARIO S.A."
Printer.FontName = "Arial"
Printer.FontBold = False
Printer.FontSize = 8.5
Printer.Print Tab(65); lblFormulario.Caption & txtFormulario.Text; Spc(3); lblOrden.Caption & " " & txtOrden.Text; Spc(4); mskFecha.Text & " " & mskHora.Text
Printer.CurrentY = Printer.CurrentY + 3
If txtpago.Text = 0 Then
Printer.Print Tab(65); lblPagoBanco.Caption & " " & lblPago.Caption; Spc(7); txtpago.Text & " Otros:"
Else
VTLongitud = Len(txtpago.Text)
Printer.Print Tab(65); "Pago en Banco:"; Spc(11 - VTLongitud); txtpago.Text & " " & lblPago.Caption; Spc(8 - VTLongitud); txtpago.Text & " Otros:"
End If
Printer.CurrentY = Printer.CurrentY + 3
Printer.Print Tab(65); lblRUC.Caption & " " & txtRUC.Text; Spc(3); lblBanco.Caption & " " & txtSucursal.Text & " " & txtCajero.Text & " " & txtSecuencial.Text; Spc(13); txtAleatorio.Text
Printer.CurrentY = Printer.CurrentY + 3
Printer.Print Tab(84); lblCajero.Caption & " " & txtNomCajero.Text
Printer.EndDoc
|
|
13-05-2004 at 09:47 PM |
|
|  |
|
|
|
|
 |
 |