Im new to vb.net, and Im trying to print from a form that was filled out. Ive got it to work, but Im not sure how to start a new page. This is the code I have so far. Any help would be appreciated. Thanks.
Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
e.Graphics.DrawString(Title.Text, New Font("Arial", 18, FontStyle.Bold), Brushes.Black, 350, 100)
e.Graphics.DrawString(Address1.Text, New Font("Arial", 12, FontStyle.Bold), Brushes.Black, 350, 130)
If Address2.Text <> "" Then
e.Graphics.DrawString(Address2.Text, New Font("Arial", 12, FontStyle.Bold), Brushes.Black, 350, 150)
e.Graphics.DrawString(Address3.Text, New Font("Arial", 12, FontStyle.Bold), Brushes.Black, 350, 170)
Else
e.Graphics.DrawString(Address3.Text, New Font("Arial", 12, FontStyle.Bold), Brushes.Black, 350, 150)
End If
If CoverPic.Image Is Nothing Then
Else
e.Graphics.DrawImage(CoverPic.Image, 75, 300)
End If
End Sub
Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
e.Graphics.DrawString(Title.Text, New Font("Arial", 18, FontStyle.Bold), Brushes.Black, 350, 100)
e.Graphics.DrawString(Address1.Text, New Font("Arial", 12, FontStyle.Bold), Brushes.Black, 350, 130)
If Address2.Text <> "" Then
e.Graphics.DrawString(Address2.Text, New Font("Arial", 12, FontStyle.Bold), Brushes.Black, 350, 150)
e.Graphics.DrawString(Address3.Text, New Font("Arial", 12, FontStyle.Bold), Brushes.Black, 350, 170)
Else
e.Graphics.DrawString(Address3.Text, New Font("Arial", 12, FontStyle.Bold), Brushes.Black, 350, 150)
End If
If CoverPic.Image Is Nothing Then
Else
e.Graphics.DrawImage(CoverPic.Image, 75, 300)
End If
End Sub