I found this here code today that works great except for one major thing....It likes to print out a blank page with a "s" or "J" or "W" on the top of the page. Here is the form code that goes into an event area:
Public Class Form1
#Region " PrintDocument "
Public Sub PrintDocument()
'Create an instance of our printer class
Dim printer As New PCPrint()
'Set the font we want to use
printer.PrinterFont = New Font("Verdana", 10)
'Set the TextToPrint property
printer.TextToPrint = TextBox1.Text
'Issue print command
printer.Print()
End Sub
#End Region
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
PrintDocument()
End Sub
End Class
And here is the Code that goes into a Class form:
Public Class Form1
#Region " PrintDocument "
Public Sub PrintDocument()
'Create an instance of our printer class
Dim printer As New PCPrint()
'Set the font we want to use
printer.PrinterFont = New Font("Verdana", 10)
'Set the TextToPrint property
printer.TextToPrint = TextBox1.Text
'Issue print command
printer.Print()
End Sub
#End Region
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
PrintDocument()
End Sub
End Class
Can someone tell me how to get rid of this second page printing problem?
Public Class Form1
#Region " PrintDocument "
Public Sub PrintDocument()
'Create an instance of our printer class
Dim printer As New PCPrint()
'Set the font we want to use
printer.PrinterFont = New Font("Verdana", 10)
'Set the TextToPrint property
printer.TextToPrint = TextBox1.Text
'Issue print command
printer.Print()
End Sub
#End Region
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
PrintDocument()
End Sub
End Class
And here is the Code that goes into a Class form:
Public Class Form1
#Region " PrintDocument "
Public Sub PrintDocument()
'Create an instance of our printer class
Dim printer As New PCPrint()
'Set the font we want to use
printer.PrinterFont = New Font("Verdana", 10)
'Set the TextToPrint property
printer.TextToPrint = TextBox1.Text
'Issue print command
printer.Print()
End Sub
#End Region
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
PrintDocument()
End Sub
End Class
Can someone tell me how to get rid of this second page printing problem?