vbnetbeginner1
New member
- Joined
- Apr 15, 2012
- Messages
- 1
- Programming Experience
- Beginner
IIssues with Printing to center of page
Please any great help on this will be appreciated.
I am trying to print to the center of page and to make the page portrait.
Here is the code I have now.
Dim ppagecounter As Int32 = 4
Public Sub printDoc_PrintPage(ByVal sender As Object, ByVal e As PrintPageEventArgs) Handles PrintDocument1.PrintPage
Dim fontype As New Font("Tahoma", 12)
e.Graphics.DrawString("*section document", fontype, Brushes.Black, 100, 100)
ppagecounter= ppagecounter- 1
If ppagecounter= 0 Then
e.HasMorePages = False
Else
e.HasMorePages = True
End If
End Sub
Thanks!!!
I am trying to print to the center of page and to make the page portrait.
Here is the code I have now.
Dim ppagecounter As Int32 = 4
Public Sub printDoc_PrintPage(ByVal sender As Object, ByVal e As PrintPageEventArgs) Handles PrintDocument1.PrintPage
Dim fontype As New Font("Tahoma", 12)
e.Graphics.DrawString("*section document", fontype, Brushes.Black, 100, 100)
ppagecounter= ppagecounter- 1
If ppagecounter= 0 Then
e.HasMorePages = False
Else
e.HasMorePages = True
End If
End Sub
Thanks!!!