Ok All I want to do is print a string on a piece of paper. Sounds simple enough right? Well, for some reason when i use the code below, my printer only prints a portion of the text instead of the whole thing.
So, i busted out the ruler and noticed that it is printing 8.5cm across and 11cm down which is odd since my paper is 8.5" x 11". When i use my print preview everything looks good but as soon as I actually print the paper, it only prints the small retangular portion listed above.
Code:
PrivateSub PrintDoc_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDoc.PrintPage
Dim strPrintString AsString
strPrintString = "Event: " & txtEvent.Text & vbCrLf & vbCrLf & vbCrLf & vbCrLf _
& "Directions: " & Me.txtDirections.Text & vbCrLf & vbCrLf & "Contact: " _
& txtContact.Text
Dim text AsString = strPrintString
Dim printFont AsNew System.Drawing.Font("Arial", 14, System.Drawing.FontStyle.Regular)
e.Graphics.DrawString(text, printFont, System.Drawing.Brushes.Black, 100, 100)
EndSub
So, i busted out the ruler and noticed that it is printing 8.5cm across and 11cm down which is odd since my paper is 8.5" x 11". When i use my print preview everything looks good but as soon as I actually print the paper, it only prints the small retangular portion listed above.
Code:
PrivateSub PrintDoc_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDoc.PrintPage
Dim strPrintString AsString
strPrintString = "Event: " & txtEvent.Text & vbCrLf & vbCrLf & vbCrLf & vbCrLf _
& "Directions: " & Me.txtDirections.Text & vbCrLf & vbCrLf & "Contact: " _
& txtContact.Text
Dim text AsString = strPrintString
Dim printFont AsNew System.Drawing.Font("Arial", 14, System.Drawing.FontStyle.Regular)
e.Graphics.DrawString(text, printFont, System.Drawing.Brushes.Black, 100, 100)
EndSub