I'm trying to make print preview work on an application which has the visio drawing control in it.
I would typically get pages that spans over several physical printer pages so it is vital that all these are shown in the print preview control.
So far I've been able to preview only the upper left print page but can't get the other print pages in it to.
What I've been doing so far is to do ShowDialog on the PrintPreviewDialog which then starts my printpage eventhandler on my printdocument.
The code in the eventhandler looks like this:
Dim intPointer As New System.IntPtr(Me.drawingControl.Window.Application.ActivePage.PageSheet.Picture.Handle)
Dim mf As New Drawing.Imaging.Metafile(intPointer, False)
e.Graphics.DrawImage(mf, 0, 0)
Any help on getting the preview dialog to show all physical pages will be very appreciated.
I would typically get pages that spans over several physical printer pages so it is vital that all these are shown in the print preview control.
So far I've been able to preview only the upper left print page but can't get the other print pages in it to.
What I've been doing so far is to do ShowDialog on the PrintPreviewDialog which then starts my printpage eventhandler on my printdocument.
The code in the eventhandler looks like this:
Dim intPointer As New System.IntPtr(Me.drawingControl.Window.Application.ActivePage.PageSheet.Picture.Handle)
Dim mf As New Drawing.Imaging.Metafile(intPointer, False)
e.Graphics.DrawImage(mf, 0, 0)
Any help on getting the preview dialog to show all physical pages will be very appreciated.