Link to home
Start Free TrialLog in
Avatar of craigdev
craigdev

asked on

PrintPreviewDialog1.ShowDialog() unhandled exception

I have a private function in my program called OnPrintPage, this adds images using e.Graphics.DrawImage(MyImage, x, y) to the printing area. X and y are incremented in OnPrintPage so as to add a selection of images for printing. The entire function OnPrintPage completes without exceptions, however when a call to ShowDialog on a PrintPreviewDialog is made an unhandled exception occurs. THis only happens when the images fall outside the first page. With a couple of images, it works fine. With more images than there is available space for y I get this error.

What should I do to print onto multiple pages??
ASKER CERTIFIED SOLUTION
Avatar of AlexFM
AlexFM

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial