Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print preview when page spans over more than 1 physical printer pages

Status
Not open for further replies.

NGordian

Programmer
Apr 25, 2005
10
0
0
DK
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top