H
Hany Metry
Guest
Hi,
The code print the two pages in the first page. How to make it print two separate pages
Friend Sub PrintPage1ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles PrintPage1ToolStripMenuItem.Click
PrintDocument1.DefaultPageSettings.Landscape = False
AddHandler PrintDocument1.PrintPage, AddressOf PDoc1_PrintPage
popo = 1
PrintDocument1.Print()
End Sub
Friend Sub PDoc1_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
If popo = 1 Then
e.Graphics.DrawString(" Page 1", prFont, Brush2, margins.Left, 1100)
e.HasMorePages = True
popo += 1
Exit Sub
ElseIf popo = 2 Then
e.Graphics.DrawString(" Page 2", prFont, Brush2, margins.Left, 1100)
e.HasMorePages = False
End If
end sub
Please advice.
Kind Regards,
Hany Metry
Continue reading...
The code print the two pages in the first page. How to make it print two separate pages
Friend Sub PrintPage1ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles PrintPage1ToolStripMenuItem.Click
PrintDocument1.DefaultPageSettings.Landscape = False
AddHandler PrintDocument1.PrintPage, AddressOf PDoc1_PrintPage
popo = 1
PrintDocument1.Print()
End Sub
Friend Sub PDoc1_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
If popo = 1 Then
e.Graphics.DrawString(" Page 1", prFont, Brush2, margins.Left, 1100)
e.HasMorePages = True
popo += 1
Exit Sub
ElseIf popo = 2 Then
e.Graphics.DrawString(" Page 2", prFont, Brush2, margins.Left, 1100)
e.HasMorePages = False
End If
end sub
Please advice.
Kind Regards,
Hany Metry
Continue reading...