Printing Long List.

TwoWing

Well-known member
Joined
Jan 6, 2006
Messages
71
Location
Near Portsmouth, England
Programming Experience
Beginner
Hi.
I have found the coding for printing a long list from a Text File (From MSDN - Help) whereby it goes on to extra pages but I cannot seem to convert the coding so it does the same from a List Box. This is my coding which prints just one page. I need to print onto extra pages to continue the list.

VB.NET:
Dim f As New Font("Eurostyle", 16, FontStyle.Regular)
Dim x As Single, y As Single
Dim h As Single = 30
x = e.MarginBounds.Left
y = e.MarginBounds.Top
Dim item As String
For Each item In lstIndex.Items
e.Graphics.DrawString(item, f, Brushes.Black, x, y)
y += h
Next

I believe I need coding to include :
VB.NET:
e.HasMorePages=True
Can some kind person(s) guide me please.
It is just one of those bits of coding that a learner like myself has to pick up.
Thanks for any help.

 
Back
Top