VB.NET,
Come posso fare per Stampare un documento con qualche linea orizzontale, vorrei fare un report, ma non con Crystal Report.
Ho trovato questo, come vi sembra ???
Ma se io voglio stampare un "DataSet" di dati ???
Private Sub PrintText(ByVal sender As Object, ByVal ev As PrintPageEventArgs)
ev.Graphics.DrawString(read("Nome"), New Font("Arial", 8, FontStyle.Regular), Brushes.Black, 50, 100)
ev.Graphics.DrawString(read("Cognome"), New Font("Arial", 8, FontStyle.Regular), Brushes.Black, 150, 100)
ev.HasMorePages = False
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim PrintDoc As New PrintDocument()
AddHandler PrintDoc.PrintPage, AddressOf Me.PrintText
AddHandler PrintDocument1.PrintPage, AddressOf Me.PrintText
PrintDoc.Print()
End Sub
vBulletin® v3.6.4, Copyright ©2000-2025, Jelsoft Enterprises Ltd.