Link to home
Start Free TrialLog in
Avatar of TSO Fong
TSO FongFlag for Sweden

asked on

Printing a Form Landscape

I need to print a form landscape.

Microsoft says, "When using the PrintForm method to print a Form, you have no control over the orientation." Then they give you a method of printing the form landscape as a PictureBox. The trouble with this is the print quality is degraded, which makes small text hard to read.

In the same article, Microsoft says, "You could change printer settings with APIs, print the Form, then change them back. ..." This is my preferred method. But I don't know where to start.

Could someone please tell me how to do this?

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of roverm
roverm
Flag of Netherlands image

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
Avatar of TSO Fong

ASKER

RoverM --
Thanks for the speedy response.

I've looked at the PageSet.dll, and it looks like it would do the trick _for me_, but I'm not so sure about how I would implement it for the end product. I'm new to VB, and I don't know if simply including the .dll in the .cab when my final product is ready for the world of what-it's-worth-to-you-ware distribution will get the .dll properly registered, or if end users will have to go through the registration step.

Tossing another spanner into the works, the EULA the Micro$oft makes you agree to when you download the .dll states that you can't pass it around without including the full text of the instructions, and can't distribute it in foreigh countries, etc. And though I can't imagine the fine folks at Micro$oft are likely to come looking for me if I give away the .dll that they let you download for free, I don't relish the thought of dealing with lawyers.

If there is a more self-contained option with an API call, I'm all for it. How do you propose I pass you my e-mail?
You can use the PAGESET dll, I do it also in the Netherlands !
About distribution: if you use the Package & Deploy wizard the DLL is automaticly included in de CAB file.

If you want to use API calls, make a temporary email at hotmail.com and post
it at EE. I will you the example then !

grtx, RoverM
Sorry, ....I will MAIL you the example then ....
Thanks, RoverM. My new address is barrytice@hotmail.com.

I appreciate the extra effort on this! -- b.r.t.
BarryTice, I will send you the example in the morning in a zip format.
It's 8 pm in the Netherlands now and I have the example at my work so I will mail it to you in approx. 14 hours. Can you wait that long ? ;-)
grtx, RoverM
Sure thing, RoverM. That's the beauty of volunteering to write software for free as a learning experience -- nobody can enforce a deadline on you!

I appreciate all your help, and can reasonably assure you I won't be awake to receive your e-mail as it arrives. -- b.r.t.
BT: I mailed it this morning (about 5 hours ago), did you receive it ?
grtx, RoverM
Thanks for the e-mail, RoverM. I tried it this morning and it did the trick quite nicely. Now all I need to do is work my way through the code and figure out what it's doing.

You'll notice a few points have been added to cover your extra efforts. It's still a bargain, as far as I'm concerned!

-- b.r.t.

To anyone else reading this: If you need a copy of the zipped vb project RoverM supplied, send a request to my e-mail address above.
Tenx for the extra points !
Wasn't neccesairy but thanks anyway !

grtx, RoverM