Visual Basic - nesesito ayuda para imprimir en una impresora LPT1 en VB6.0

Life is soft - evento anual de software empresarial
 
Vista:
sin imagen de perfil

nesesito ayuda para imprimir en una impresora LPT1 en VB6.0

Publicado por javier (5 intervenciones) el 03/12/2014 22:53:36
hola soy nuevo, me gustaria pregunta si me pueden ayudar, tengo que hacer un programa de boletas en visual basic 6.0y en una impresora de puerto paralelo (PLT1) pero al lasan la imprecion me sale otra cosa en loga de la imprecion que debe salir mi codigo que uso es este:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
Private Sub Command2_Click()
If Tip4(0) = "" Then Exit Sub
If A = A Then A = A - 1
Printer.Print ""
Printer.Print "MARIA  IVONNE  RAMOS  QUIROGA"
Printer.Print ""
Printer.Print "Bazar  -  Venta de Pañales"
Printer.Print "Perfumeria  -  Abarrotes"
Printer.Print "Bolsas  -  Envases"
Printer.Print "Desechables"
Printer.Print ""
Printer.Print "SANTA RAQUE Nº 10390"
Printer.Print "Local A3 D - Fono: 227854001"
Printer.Print "La Florida - SANTIAGO"
Printer.Print ""
Printer.Print "Numero de Boleta:"; Num5
Printer.Print ""
Printer.Print "DETALLE DE VENTA"
Printer.Print ""
Dim I As Long
For I = 0 To A
Printer.Print Tip4(I); ". "; Mar4(I)
Printer.Print Can4(I); "  X  $"; PreU4(I); ":   $"; PreV4(I)
Next
Printer.Print ""
Printer.Print "TOTAL A PAGAR:  $"; Label16.Caption
Printer.Print ""
Printer.Print Date; " -- "; Time()
Printer.Print "GRACIAS POR SU COMPRA. . ."
Printer.EndDoc
 
Printer.Print ""
Printer.Print "MARIA  IVONNE  RAMOS  QUIROGA"
Printer.Print ""
Printer.Print "Bazar  -  Venta de Pañales"
Printer.Print "Perfumeria  -  Abarrotes"
Printer.Print "Bolsas  -  Envases"
Printer.Print "Desechables"
Printer.Print ""
Printer.Print "SANTA RAQUE Nº 10390"
Printer.Print "Local A3 D - Fono: 227854001"
Printer.Print "La Florida - SANTIAGO"
Printer.Print ""
Printer.Print "Numero de Boleta:"; Num5
Printer.Print ""
Printer.Print "DETALLE DE VENTA"
Printer.Print ""
For I = 0 To A
Printer.Print Tip4(I); ". "; Mar4(I)
Printer.Print Can4(I); "  X  $"; PreU4(I); ":  $"; PreV4(I)
Next
Printer.Print ""
Printer.Print "TOTAL A PAGAR:  $"; Label16.Caption
Printer.Print ""
Printer.Print Date; " -- "; Time()
Printer.Print "GRACIAS POR SU COMPRA. . ."
Printer.EndDoc
 
For I = 0 To A
 
Bodega_1
With Bodega_0
.Requery
'On Error Resume Next
.Find "cod1='" & Trim(Cod4(I)) & "'"
If .EOF Then
MsgBox "El producto ''NO'' esta registrado!!!!!!!", vbCritical, "AVISO"
Exit Sub
Else
!can1 = !can1 - Can4(I)
End If
.UpdateBatch
.Requery
End With
 
Next
Label16.Caption = ""
For I = 0 To A
Venta_1
With Venta_0
.Requery
.AddNew
!num2 = Num5
!fec2 = Date
!cod2 = Cod4(I)
!tip2 = Tip4(I)
!mar2 = Mar4(I)
!can2 = Can4(I)
!pre2 = PreU4(I)
!pag2 = PreV4(I)
.Update
.Requery
End With
Next
 
Numero_1
With Numero_0
.Requery
.AddNew
!num0 = Num5
.Update
.Requery
End With
 
Boleta_1
With Boleta_0
If .State = 1 Then .Close
        .Open "delete * from boleta_bod"
End With
 
Numero_1
With Numero_0
For Z = 0 To .RecordCount
If Z = .RecordCount Then Num5 = Num5 + 1 Else .MoveNext
Next
End With
Frame1.Caption = Num5
 
For I = 0 To A
Cod4(A) = 0
Tip4(A) = ""
Mar4(A) = ""
Can4(A) = 0
PreU4(A) = 0
PreV4(A) = 0
Next
Label16.Caption = ""
A = 0
 
End Sub
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
sin imagen de perfil

nesesito ayuda para imprimir en una impresora LPT1 en VB6.0

Publicado por javier valenzuela (5 intervenciones) el 04/12/2014 15:28:19
hola, si mucha gracias, me sirve esta intruccion:

Open LPT1 For Output As #FreeFile
Print #FreeFile, "Lo que quiera imprimir"
Close #FreeFile

pero hay un problema, no me gustaria ser muy paturo, pero no entiendo muy bien esta intruccion ya que nunca la avia trabajado, te molesta si te pregunto unas cositas?
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
Imágen de perfil de xve
Val: 107
Ha disminuido su posición en 2 puestos en Visual Basic (en relación al último mes)
Gráfica de Visual Basic

nesesito ayuda para imprimir en una impresora LPT1 en VB6.0

Publicado por xve (208 intervenciones) el 04/12/2014 15:48:56
No soy un experto en VB, pero intento ayudarte sin problema...
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar