Ver Mensaje Individual
  #3 (permalink)  
Antiguo 03/11/2011, 14:31
Geovanny0401
 
Fecha de Ingreso: diciembre-2009
Mensajes: 137
Antigüedad: 14 años, 4 meses
Puntos: 4
Pregunta Respuesta: Imprimir en VB .Net

Código PHP:
Public Sub ImprimirTexto(ByVal lPos As SingleByVal rPos As SingleByRef yPos As SingleByVal Texto As StringByVal FontImp As System.Drawing.FontByVal ev As System.Drawing.Printing.PrintPageEventArgsOptional ByVal sep As Long 0Optional ByVal lngAlto As Long 980)
        
Dim lngEspacio As Single rPos lPos
        Dim K 
As LongtmpTexto As String
        
If lngEspacio 0 Then
            lngEspacio 
100
        End 
If
        
Texto Comprimir(Texto)
        Do While 
ev.Graphics.MeasureString(TextoFontImp).Width lngEspacio
            K 
1
            
Do While (ev.Graphics.MeasureString(Mid(Texto1K), FontImp).Width lngEspacio)
                
+= 1
            Loop
            
Do While And (InStr(" ,;."Mid(TextoK1)) = 0)
                
-= 1
            Loop
            
If 1 Then
                tmpTexto 
Mid(Texto1K)
                
Texto Comprimir(Mid(Texto1))
            Else
                
tmpTexto Texto
                Texto 
""
            
End If
            
ev.Graphics.DrawString(tmpTextoFontImpBrushes.BlacklPosyPos, New StringFormat)
            
yPos += FontImp.GetHeight(ev.Graphics) + sep
            
If yPos >= lngAlto Then
                
Exit Do
            
End If
        
Loop
        
If Texto.Length 0 Then
            ev
.Graphics.DrawString(TextoFontImpBrushes.BlacklPosyPos, New StringFormat)
            
yPos += FontImp.GetHeight(ev.Graphics) + sep
        End 
If
    
End Sub