Hi,
I would add a printdocument variable to print from a class
Dim WithEvents m_pdMyDoc As System.Drawing.Printing.PrintDocument
Private Sub m_pdMyDoc_PrintPage(ByVal sender As Object, ByVal e As
System.Drawing.Printing.PrintPageEventArgs) Handles m_pdMyDoc.PrintPage
Dim fnt As New Font(FontFamily.GenericSansSerif, FontStyle.Regular)
e.Graphics.DrawString("Test", fnt, Brushes.Black, 0, 0)
End Sub
Public Sub PrintOut()
m_pdMyDoc.Print()
End Sub
Ken
----------------------------
"James Proctor" <ja**********@ebmis.co.uk> wrote in message
news:B7**********************************@microsof t.com...
Hi there,
Ive got a class which i use for alot of data storage in my program and id
like to add a print routine to this class so that i can print out a
formatted version of all the data. I just cant seem to work out how to
create a document in the class and then link the preview and print dialogs
to it. Does anyone have any tips or know of tutorials which show how to do
this with out placing controls on a form. Hope someone can help out.
Regards
James Proctor
http://www.ebmis.co.uk