PDA

Click to See Complete Forum and Search --> : Printer Orientation


Skylark
Aug 24th, 2000, 01:53 AM
We have an application (written in VB3) to print a report in landscape orientation.
The program made use of the Windows API Escape() function to change the orientation of the
printer by passing GETSETPAPERORIENT as an argument.

This application is currently running on a Windows 3.1 environment.

However, we are in the process of migrating the platform to windows 2000 and discovered
that the report is no longer printed out in landscape format due to a newer version of GDI being used on the win2k platform.

Could someone be able to shed some lights regarding the usage of this new version of GDI for printing in landscape mode on a Win2K platform.

Thanks in advance

gfrench
Aug 24th, 2000, 09:15 AM
I hope you are not still using VB3!!!

if you are not you can change the orientation using the printer object, ie.

Printer.Orientation = 2 'Set the orientation of the printer to Landscape (Portrait = 1)

Hope this helps, if you have any problems contact me.

Grant French

e-mail: grant.french@libertysurf.co.uk
ICQ: 33122184

Skylark
Aug 24th, 2000, 07:28 PM
I am awared of the printer object setting but unforunately,
we are still using VB3!!! as compiling the application in question using VB4 and above would affect the other applications that shared the common modules.

I've no other choice except to make use of this new version of GDI which has been developed especially to be compatible with both 16 bit apps and the Windows 2000 platform.

Any other suggestions are much appreciated.

gfrench
Aug 25th, 2000, 04:04 AM
The only other way is through api calls, but windows 3.1 will not accept them, apart from that you might have to try and find a vbx file to do the job for you in c.

Tonatiuh
Aug 25th, 2000, 08:30 AM
I have found that, at least, in the HP DeskJet 1200C and 1600C, the Printer.Orientation=2 return an error.

Any idea about it?