
10/08/2004, 07:48
|
| | Fecha de Ingreso: abril-2004 Ubicación: caracas
Mensajes: 58
Antigüedad: 21 años Puntos: 0 | |
SI ES DIRECTAMENTE A LA IMPRESORA PUEDES HACERLO ASI:
ES UNA FUNCION Q VAS COLOCANDO LA POSICION DONDE QUIERES IMPRIMIR Y EL TIPO DE LETRA EL TAMAÑO, ETC..) IMPRIME SON LOS CONTROLES ACTUALES DE LA VENTANA D TU APLICACION
Private Function cmd_imprimir()
Dim Numeros As New clsNumeros
Printer.ForeColor = RGB(0, 0, 0)
Printer.FontSize = 8
'*** IMPRIMIR EL MONTO DE CHEQUE EN LETRAS
If IsNumeric(tmonto.Text) Then
Printer.CurrentX = 2900 'Posición horizontal
Printer.CurrentY = 2800 'Posición vertical
Printer.FontSize = 8
'Printer.Print Numeros.NroEnLetras(tmonto.Text)
Call justifica_printer2(2900, 9700, 2800, Numeros.NroEnLetras(tmonto.Text))
Else
MsgBox "Debe ingresar un numero.", vbInformation, "Atencion"
End If
On Error GoTo Control_Err
Printer.FontSize = 9 'El tamaño del texto
' ***MONTO DEL CHEQUE
Printer.CurrentX = 8700 'Posición horizontal
Printer.CurrentY = 1600 'Posición vertical
Printer.Print tmonto.Text
' **NOMBRE DE LA PÈRSONA
Printer.FontSize = 9
Printer.CurrentX = 2900 'Posición horizontal
Printer.CurrentY = 2400 'Posición vertical
Printer.Print tpers.Text
'*** OBSERVACION
Printer.FontSize = 8 'El tamaño del texto
'Printer.CurrentX = 2700 'Posición horizontal
'Printer.CurrentY = 7000 'Posición vertical
'Printer.Print tobservacion.Text
Call justifica_printer(2700, 8000, 7000, tobservacion.Text)
' ***MONTO DEL CHEQUE
Printer.FontSize = 10 'El tamaño del texto
Printer.CurrentX = 9500 'Posición horizontal
Printer.CurrentY = 7600 'Posición vertical5
Printer.Print tmonto.Text
'*** EL USUARIO
Printer.FontSize = 8 'El tamaño del texto
Printer.CurrentX = 1700 'Posición horizontal
Printer.CurrentY = 10800 'Posición vertical
Printer.Print tusu.Text
' ***NRO DE LA CUENTA
Printer.FontSize = 9 'El tamaño del texto
Printer.CurrentX = 2800 'Posición horizontal
Printer.CurrentY = 9800 'Posición vertical
Printer.Print tcuenta.Text
' ***fecha
Printer.FontSize = 10 'El tamaño del texto
Printer.CurrentX = 1700 'Posición horizontal
Printer.CurrentY = 3400 'Posición vertical
Printer.Print Day(tfecha.Text)
Printer.FontSize = 10 'El tamaño del texto
Printer.CurrentX = 2300 'Posición horizontal
Printer.CurrentY = 3400 'Posición vertical
Printer.Print "de"
mes = Month(tfecha.Text)
mesc = MonthName(mes)
Printer.FontSize = 10 'El tamaño del texto
Printer.CurrentX = 2900 'Posición horizontal
Printer.CurrentY = 3400 'Posición vertical
Printer.Print MonthName(mes)
Printer.FontSize = 10 'El tamaño del texto
Printer.CurrentX = 5080 'Posición horizontal
Printer.CurrentY = 3400 'Posición vertical
Printer.Print Year(tfecha.Text)
'** BANCO
Printer.FontSize = 8 'El tamaño del texto
Printer.CurrentX = 4400 'Posición horizontal
Printer.CurrentY = 9300 'Posición vertical
Printer.Print tban.Text
' *** NRO DEL CHEQUE
Printer.FontSize = 9 'El tamaño del texto
Printer.CurrentX = 2500 'Posición horizontal
Printer.CurrentY = 9300 'Posición vertical
Printer.Print tnrocheque.Text
' SI ES O NO ENDOSABLE
If tsi.Value = True Then
Printer.FontSize = 14 'El tamaño del texto
Printer.CurrentX = 5700 'Posición horizontal
Printer.CurrentY = 4400 'Posición vertical
Printer.Print "NO ENDOSABLE"
End If
End If
Printer.EndDoc
Control_Exit:
Exit Function
Control_Err:
MsgBox Err.Description, vbExclamation, "Error de sistema"
Resume Control_Exit
End Function
ESTA ES LA LLAMADA DE LA FUNCION Q ESTA EN EL CLIC DEL BOTON IMPRIMIR DE LA VENTANA:
Private Sub imprimir_Click()
If MsgBox("¿Desea imprimir?", vbYesNo + vbInformation, "Atención") = vbYes Then
Call cmd_imprimir
End If
End Sub
ESPERO Q T SIRVA |