Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printer Stuff
Message
From
19/02/1999 22:14:26
 
 
To
19/02/1999 21:54:50
Mark Hall
Independent Developer & Voip Specialist
Keston, Kent, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
00189600
Message ID:
00189605
Views:
10
>I'm sure I have read the answer to this somewhere on the thread before, but I can't find it anywhere. So, here goes:
>
>How do I change the default printers paper orientation to landscape/portrait via an API call?
>
>I am creating simple reports with a CREATE REPORT command, and I have tried altering the ORIENTATION= expression in the EXPR field of the FRX, but this is no good, as the .FRX created by the CREATE REPORT command sets fields out based on the current default paper orientation, so I need the default to be Landscape before I actually create the report.
>

The API call is SetPrinter(); it's not a trivial undertaking to implement, though. I've been playing with implementing it using CLSHEAP to handle the PRINTER_INFO_2 strucutre, which contains a pointer to a DEVMODE strucutre, which controls basic printer setup parameters.

Since your concern is about a design-time tool, why not just use the Page Setup dialog under the File menu to do this, or access the dialog through the Shell.Application ControlPanelItem method to launch the Control Panel applet?
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform