Visual Basic Express Work Review
Private Sub PrintDocument1_PrintPage(sender As Object, e As Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage Dim textToPrint As String = My.Computer.FileSystem.ReadAllText("C:\temp\MyPaper.txt") e.Graphics.DrawString(textToPrint, New Font("Arial", 12), Brushes.Black, 100, 100) End Sub End Class
' Save to a file My.Computer.FileSystem.WriteAllText("C:\temp\MyPaper.txt", paper, False) visual basic express
If you meant , let me know and I’ll show you how to use Microsoft.Office.Interop.Word or a PDF library with VB Express. Private Sub PrintDocument1_PrintPage(sender As Object
' Optional: Print directly PrintDocument1.DocumentName = "MyPaper" PrintDocument1.Print() End Sub False)
If you meant
Private Sub PrintDocument1_PrintPage(sender As Object, e As Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage Dim textToPrint As String = My.Computer.FileSystem.ReadAllText("C:\temp\MyPaper.txt") e.Graphics.DrawString(textToPrint, New Font("Arial", 12), Brushes.Black, 100, 100) End Sub End Class
' Save to a file My.Computer.FileSystem.WriteAllText("C:\temp\MyPaper.txt", paper, False)
If you meant , let me know and I’ll show you how to use Microsoft.Office.Interop.Word or a PDF library with VB Express.
' Optional: Print directly PrintDocument1.DocumentName = "MyPaper" PrintDocument1.Print() End Sub