|I must be missing something.
I tested this in a small stand alone application and it works fine (sample project I downloaded)
Protected Sub PrintFile_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles PrintFile.Click
printDialog1.Document = ThePrintDocument 'ThePrintDocument is dfined as System.Drawing.Printing.PrintDocument
If printDialog1.ShowDialog() = DialogResult.OK Then
End Sub 'PrintFile_Click
I have a sub routine that does the printing as follows:
Protected Sub ThePrintDocument_PrintPage(ByVal sender As Object, ByVal ev As System.Drawing.Printing.PrintPageEventArgs) Handles ThePrintDocument.PrintPage
End Sub 'ThePrintDocument_PrintPage
In my small test app this works perfectly, print dialog shows up, select destination and it calls the print page routine. I then incorporated this into the application I am upgrading and I get the print dialog but when I click OK on the dialog it does not return to call the print event. Any idea what I may have missed?
I did notice that if I search the sample project for ThePrintDocument in the sample project I see definitions in a resx file, but I do not understand the resx file or how to use it.
I defined by simply entering the definition, should I have dragged something from the toolbox perhaps?
Friend WithEvents ThePrintDocument As System.Drawing.Printing.PrintDocument
Thanks in advance