printdialog.showdialog(); not showing the print dialog in windows 7 with 64 bit
Asked Answered
I

5

11

I have custom control with print toolbar item.when print the control the dialog is not coming in windows 7 with 64 bit os in other system os working fine. problem only in windows 7 with 64 bit.

my problem printdialog is not coming in windows 7 os with 64 bit.

i have checked and anlyaed -->PrintDialog.ShowDialog() returns immeaditely cancel instaed of showing the dialog thats the problem.

i have found the solution for the problem by searched following links:

http://social.msdn.microsoft.com/Forums/en/netfx64bit/thread/8760fb6c-ae63-444e-9606-cd3295ce6b5d

http://msdn.microsoft.com/en-us/library/system.windows.forms.printdialog.useexdialog.aspx

by setting true to UseExDialog property of printdialog the dialog comes and working fine.but this dialog style is like windows XP not windows7 style.so this is not excat solution.

UseExDialog property sets to true means working fine.but the print dialog style looks like windows XP print not like windows 7. i need some other solution for showing print dialog in windows 7 os with 64 bit.

please provide complete solution for this problem

Thanks

Siva

Impregnable answered 17/6, 2011 at 12:39 Comment(1)
Did you find a solution? Are you able to do this now without using the "UseEXDialog" -property?Valance
A
20

Per Microsoft's Forums:

via Mike Dos Zhang (MSFT CSG)

The PrintDialog class may not work on AMD64(x64 or Any CPU is belong to AMD64 technical, including intel x64cpu) microprocessors unless you set the UseEXDialog property to true.

This is a known issue.

And this limitation has been supported in .net framework4, so if you want use this class with windows7 style dialog, then you will need to use .net framework4, otherwise you will need to use the xp style dialog with set the UseEXDialog property to true, or using x86 target platform.

In my case the 2nd known issue was it... we upgraded from .NET 2.0 to .NET 4.0 and it started working again without any code changes (to the printing).

Arithmetic answered 2/5, 2012 at 12:58 Comment(0)
S
4

If you can't or don't like to set UseEXDialog = true an alternative would be setting your Plattform to x86

The disadvantage is obvious, but doing so should give you the advantage of not needing to upgrade your .NET Framework like uzbones did, which also could create problems.

Sorry answered 22/8, 2014 at 10:52 Comment(0)
W
0

I got the same issue for my .net framework v3.5, upgraded solution to .net framework v4.5 and it worked well.

Wimer answered 1/5, 2017 at 5:43 Comment(0)
D
-1

Just follow the steps below:

1- Open your old solution (that is created using Visual Studio 2005) in Visual Studio 2008, 2- Accept the conversion (from 2005 to 2008) while opening your solution, 3- Tick the backup checkbox and select your desired backup location, 4- After your solution was successfully opened, your solution, 5- That's it, finished. Now run your project and you will see the will be shown without any problem...

Disloyalty answered 10/3, 2023 at 8:8 Comment(0)
O
-2

Setting the dialog object property AutoUpgradeEnabled to false corrected the problem when executing in Windows 7 SP1 64-bit (solution was compiled using VS2008 and .net 2.0).

Ex.

SaveFileDialog dlg = new SaveFileDialog();    
dlg.AutoUpgradeEnabled = false;
Overflight answered 12/12, 2013 at 1:46 Comment(1)
by the way there is no AutoUpgradeEnabled property in PrintDialogSorry

© 2022 - 2024 — McMap. All rights reserved.