Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
PrintDialog Class
 UseEXDialog Property
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
PrintDialog..::.UseEXDialog Property

Gets or sets a value indicating whether the dialog should be shown in the Windows XP style for systems running Windows XP Home Edition, Windows XP Professional, Windows Server 2003 or later.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)
Visual Basic (Declaration)
Public Property UseEXDialog As Boolean
Visual Basic (Usage)
Dim instance As PrintDialog
Dim value As Boolean

value = instance.UseEXDialog

instance.UseEXDialog = value
C#
public bool UseEXDialog { get; set; }
Visual C++
public:
property bool UseEXDialog {
    bool get ();
    void set (bool value);
}
JScript
public function get UseEXDialog () : boolean
public function set UseEXDialog (value : boolean)

Property Value

Type: System..::.Boolean
true to indicate the dialog should be shown with the Windows XP style, otherwise false. The default is true.

When this property is set to true, ShowHelp and ShowNetwork will be ignored as these properties were made obsolete for Windows 2000 and later versions of Windows. Also, The PrintDialog class may not work on AMD64 microprocessors unless you set the UseEXDialog property to true.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Default is incorrect      shoagMSFT   |   Edit   |   Show History
In the Property Values section it states that the default for this property is True; the default is actually False.
this caused me grief      Louis T Klauder   |   Edit   |   Show History

Running VS 2008 on 64 bit Vista on an Intel core2 quad processor when I switched a project from .net 1.1 to .net 3.5 the print dialog stopped working. The only diagnostic I could get was that PrintDialog_inst.ShowDialog( ) returned 'Canceled'. I read a number of web postings dredged up by googling on 'PrintDialog.ShowDialog fails' and found that several people had had problems but that none of the suggestions from the trenches were relevant. Mercifully poking around the PrintDialog properites, I noticed that UseEXDialog had a default value of false and tried setting it = true, and found that that cured the problem. I googled 'PrintDialog.UseEXDialog' to see what more I might learn and came on this useful page.

However the print dialog now behaves differently than it did before. My printer is a Xerox Phaser 6350. In the print dialog Printing_Preferences/Advanced/Image_Options/Application_Reduce/Enlarge(Expert) :100, changing from 100 to 70 used to keep the content from being truncated, but now it does not seem to do anything. I will see if Xerox can help me.

Tags What's this?: Add a tag
Flag as ContentBug
happy      Louis T Klauder   |   Edit   |   Show History
updated 64 bit driver from the Xerox web site restored the Reduce/Enlarge function to its former behavior.
Tags What's this?: Add a tag
Flag as ContentBug
PrintDialog behavior in 64 bit      ldpayne   |   Edit   |   Show History

Is there any way to change the print dialog (using UseEXDialog = true) to behave like the "old" one. The "Ok" button now says "Print" and I really need it to say "Ok" for my app.

Tags What's this?: Add a tag
Flag as ContentBug
Windows 7 x64      marksam   |   Edit   |   Show History
Running on Windows 7 x64, I also had the problem of the print dialog not showing up and immediately returning Canceled. Setting UseEXDialog = true fixed this.
Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker