We have build a custom print dialog that has a button for showing the printer specific dialog. I read this answer by Shurup, and it helped me to achieve this. (Edit: But it contains an error, as explained in my answer)
However, we use this in combination with stored settings. When we call the method with our PrinterSettings
they get ignored. The native dialog shows its default settings, regardless of the provided settings object.
EDIT: Removed my fail-code.
Thanks to this page I found a working solution! The code in the other stackoverflow answer that I linked, contained a small but significant error: The external call to
DocumentProperties
had the input DEVMODE parameter defined asref
parameter. The working solution doesn't use ref! This may seem insignificant, but actually (at least in my Win32 XP environment) it caused the printer dialog to ignore the input!This code takes the settings from the PrinterSettings, sets the printer dialog accordingly and updates the PrinterSettings afterwards (you may ignore the calls to get a window handle from WPF):