
27/03/2011, 12:57
|
| | Fecha de Ingreso: abril-2008
Mensajes: 18
Antigüedad: 16 años, 11 meses Puntos: 0 | |
Respuesta: Impresión de una celda multilinea Cita:
Iniciado por gasafonso Una Forma que yo uso y esta buena, es con esta funcion el cual en "Qcontrol" es un textbox donde pones la cantidad de lineas que queres imprimir
Código vb:
Ver originalPrivate Sub ImprimirPorLinea(qControl As TextBox) Dim i As Long, k As Long Dim L1 As Long, L2 As Long Const EM_GETLINECOUNT = &HBA Const EM_LINEFROMCHAR = &HC9 Const EM_LINELENGTH = &HC1 Const EM_LINEINDEX = &HBB ' Obtenemos el Número de líneas del TextBox k = SendMessage(qControl.hwnd, EM_GETLINECOUNT, 0, 0&) txtRenglones.text = k Printer.Print "" For i = k - Val(txtRenglones) To k - 1 L1 = SendMessage(qControl.hwnd, EM_LINEINDEX, i, 0&) + 1 L2 = SendMessage(qControl.hwnd, EM_LINELENGTH, L1, 0&) Printer.Print Mid$(qControl.text, L1, L2) Next Printer.EndDoc End Sub
abrazo Gracias Gasafonso, voy a probarlo. Angeli |