المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : PrintPreview WTF?



C# Programming
08-21-2010, 11:32 AM
I was tinkering with one of my desktop applications today and discovered that on Vista (and presumably Weven) that MS took away the functionality of the Printer button on the PageSetup dialog. PageSetup.AllowPrinter = true; used to allow the printer to be selected on XP, but now the printer selection button doesn't show up at all.

WTF?

In my application I need to print to a variety of page sizes and I need to show the user how the layout will look on their printer. Under XP when the user selects a different printer, my app changes the margins and readjusts the formatting. That makes a major difference when changing from, say a normal page printer to a continuous feed plotter!

As far as I can tell, the actual printing still works fine, but what you see on the screen preview may be totally different than what gets printed and the actual number of pages is totally bogus in many cases.

Has anyone else run into this problem? What is the recommended method on Vista for setting up a print preview and allowing the user to change the printer for a given application? Do I need separate code for Vista/W7 and XP?

Any ideas?
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport ComputingSpecializing in Technical Engineering Software