471,887 Members | 1,396 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,887 software developers and data experts.

Landscape printing

Hi, I'm trying to print a text report from an application. It works
fine, except in landscape mode, which it seems to ignore. I have a
function that handles the PrintPage even for the PrintDocument, and I
even tried forcing it to print in landscape mode by adding:
ev.PageSettings.Landscape = True
(where ev is the parameter: ByVal ev As
I also tried
printDoc.DefaultPageSettings.Landscape = True
(where printDoc is a PrintDocument that is going to be printed)

But it does not print in portrait/landscape mode. I'm not sure why.
This is kinda serious because several reports are required to be in
landscape mode only.

I'm using VB 2005, and the report's data source is a simple (but wide
;) ) text file.

Jul 18 '06 #1
1 1847
I fixed the problem:

It seems I have to set landscape mode BEFORE I set the PrintPage event
handler, like this:
Me.printDoc.DefaultPageSettings.Landscape = True
AddHandler printDoc.PrintPage, AddressOf printPage

Well, hope this helps anyone else.

Jul 18 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by gilga123 | last post: by
reply views Thread by gilga123 | last post: by
3 posts views Thread by MarcJ | last post: by
2 posts views Thread by Andrei Gavra via .NET 247 | last post: by
1 post views Thread by Bill Burke | last post: by
5 posts views Thread by cpopham | last post: by
6 posts views Thread by sheinaz | last post: by
2 posts views Thread by FireStarter | last post: by
reply views Thread by zermasroor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.