Ver Mensaje Individual
  #17 (permalink)  
Antiguo 04/02/2011, 10:14
Avatar de Aquaventus
Aquaventus
 
Fecha de Ingreso: junio-2010
Ubicación: Lima-Peru , En el alba de la naturaleza
Mensajes: 2.105
Antigüedad: 13 años, 10 meses
Puntos: 267
Respuesta: imprimir varias páginas con el printdocument en vb.net

haber pruebalo asi :

Código vb.net:
Ver original
  1. Dim printFont As System.Drawing.Font
  2.         Dim linesPerPage As Single = 1 'Defino 1 linea por hoja
  3.         Dim count As Single = 0 'Defino un contador
  4.         Dim nContador As Integer = 0
  5.         Dim printFont As System.Drawing.Font
  6.         printFont = prtFont
  7.  
  8.         For Each info As BoInfo In Datos
  9.             If nContador < linesPerPage Then
  10.                 e.Graphics.DrawRectangle(New Pen(Color.Red, 1), -75, -75, 1585, 639)
  11.                 e.Graphics.DrawString("Código", printFont, Brushes.Black, 170, 60)
  12.                 e.Graphics.DrawString(info.codigo, printFont, Brushes.Black, 460, 60)
  13.             Else
  14.                 count = 0
  15.                 Exit For
  16.             End If
  17.            
  18.             nContador += 1
  19.             count += 1
  20.         Next
  21.         If nContador < Datos.Count Then
  22.             e.HasMorePages = True
  23.         Else
  24.             e.HasMorePages = False
  25.         End If
__________________
Internet es tener todo el conocimiento global a tu disposición.
Desarrollo de Software - Ejemplos .Net

Última edición por Aquaventus; 04/02/2011 a las 10:20