Sara

Sara

  • NA
  • 1
  • 0

PrintDocument.PrintPage override

Mar 25 2009 10:27 AM
I need to pass a parameter to the event PrintPage of the PrintDocument relative to my PrintPreviewDialog in some way.
I tought to inherit PrintDocument class adding to it a property with the parameter I need, creating MyPrintDocument class. Then, I would like to create MyPrintPreviewDialog class, in which I could override the Document property declaring it of MyPrintDocument type.
The problem is that the Document property is not overridable and if I declare it Shadows the PrintPageEvent doesn't raise.
Do you have a better idea? Thank you