This is my code; I expect two pages of output, but get only one.
'one button on form, used default names and settings for everything Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
PrintDocument1.DefaultPageSettings.Landscape = False 'portrait mode
PrintDocument1.Print()
'begin print
End Sub
Private Sub PrintDocument1_PrintPage(ByVal sender As Object, _
ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage Dim nFont As New System.Drawing.Font("Arial", 12, FontStyle.Regular) 'any font will do
"Printed on page 1", nFont, Brushes.Black, 250, 400)e.Graphics.DrawString(
e.HasMorePages =
True 'go to the next pagee.Graphics.DrawString(
"Printed on page 2", nFont, Brushes.Black, 250, 600) 'still printed on page 1!e.HasMorePages =
False 'if I omit this, printing continues until I abort itEnd Sub
What am I doing wrong
Fred :-(---//