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

后端 未结 4 710
抹茶落季
抹茶落季 2021-01-17 17:59

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 w

相关标签:
4条回答
  • 2021-01-17 18:07

    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).

    0 讨论(0)
  • 2021-01-17 18:09

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

    0 讨论(0)
  • 2021-01-17 18:13

    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.

    0 讨论(0)
  • 2021-01-17 18:20

    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;
    
    0 讨论(0)
提交回复
热议问题