quarta-feira, 7 de setembro de 2011

on

Private Sub btnImprimir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnImprimir.Click
        Me.PrintDocument1.Print()
    End Sub

    Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
        Dim Y As Integer = 15
        For i = 0 To Me.ListBox1.Items.Count - 1
            e.Graphics.DrawString(Me.ListBox1.Items(i).ToString(), New Font("Arial", 10, FontStyle.Regular), Brushes.Black, 10, Y)
            Y += 15
        Next
    End Sub

Espero ter ajudado e Att.

0 comentários:

Postar um comentário