Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printer Dialog box problem
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00151418
Message ID:
00151421
Views:
14
>Hi,
>
>I have a problem with the printer dialog box:
>
>I have two printers set up. PrinterA is A4, PrinterB is Letter.
>
>In the dialog box, PrinterA is displayed by default, clicking properties show A4.
>
>Changing the printer to PrinterB and then clicking properties is still shows A4 and not letter.
>
>Why and how can I solve this.

Why is that the selection of a different printer in the Windows common dialog doesn't inherently change the page layout in effect; the two are independent, even though they are changable in the same dialog. IOW, the dialog can change the printer assignment, the page layout (orientation, paper size, etc.) or both, but they change independently of each other.

How to solve it would involve not using the common dialog to make the necessary changes when switching printers. Your problem lies in the behavior of the Windows common dialog, and you'd have to substitute something you roll yourself to replace it, and the solution would only be applicable to your app that implemented your alternative method; it would not change how the Windows Print Setup common dialog worked.

Replacing it system-wide would involve creating a complete replacement for COMDLG32.OCX and COMDLG32.DLL, which provide the dialog via the ShowPrinter method. This is used pretty much by EVERY WinApp that has a Printer Dialog menu option, and would be the only way I know of to alter the behavior of the dialog in programs other than your own. It's probably not a workable alternative.

Or convince Microsoft that they're wrong, and everyone should do things the way you want it done. I suspect they'll make the change in short order - maybe when they force everyone to start programming in VFP instead of VB or VC++.

Sorry, but that's the unfortunate reality...

>
>It happens using the following techniques:
>
> sys(1037)
> printer prompt
> common dialog box
> NOTEPAD.EXE
> the main Foxpro print setup
>
>I would be grateful for a solution because I have clients that have two printers, A4 and Letter and because the system does not change the page, it prints incorrectly.
>
>Any help will be appreciated
>
>Kind regards,
>
>Kevin N. Stone
>
>http://i.am/puzzles
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