Andrew Price

I have added BeginPrint, PrintPage and EndPrint handlers to iGPrintManager.Document

These are called if I use PrintPreviewControl as the document is generated, but not when I use iGPrintManager.Print

Is there a way to handle BeginPrint, PrintPage and EndPrint when using iGPrintManager.Print ?

I have just checked with IGrid X demo (Custom Print Preview demo)
and all these events are called both for Print Preview and Print.
I beleive there could be something wrong with your project.
Andrew Price
Hi Sergiy

Thank you for your reply.

I have noticed if I display the document first using the printpreviewcontrol the events get raised, then if I use iGPrintManager.Print the events also get raised.

However, if I use iGPrintManager.Print (without displaying the document within a printpreviewcontrol) then the events do not get raised.

Your demo works because it displays a print preview first, then subsequenct iGPrintManager.Print calls raise the events.

I give the user options to PREVIEW or PRINT, so if they preview I display a form with a printpreviewcontrol on it (that prints and raises the events fine).

If they select PRINT I call iGPrintManager.Print without displaying the form or setting printpreviewcontrol.document, and the events do not get raised.

I will do some more digging around to see that I can come up with.

Andrew Price
Hi Sergiy

Sorry, my mistake.

The handlers were in the load event of the form on which the preview is displayed, so never being called unless I displayed it.

Sorry, such a silly mistake!