Posts

Has C# PrintDocument Started Showing a Varying Printer Dialog for You?

  If you maintain a Windows Forms application that prints through PrintDocument and PrintDialog , you may have noticed something strange lately: the printer dialog your users see is no longer consistent. Some users get the familiar classic print dialog. Others get a much larger dialog with an empty preview pane on the right and an odd title bar that reads “Printing from Win32 application” instead of your application’s name. Same application, same code, same printer — different dialog. We recently chased this down for our TE Edit Control component after a customer reported the new dialog appearing, and the investigation took enough wrong turns that the story seemed worth writing up. If you’re seeing the same symptom, this post should save you a day or two. The symptom Two versions of the same .NET application, both compiled against .NET Framework 2.0 with identical compiler settings, showed different print dialogs. The older build displayed the classic dialog. The newer build ...