gpt4 book ai didi

c# - printdialog.showdialog();在 64 位 Windows 7 中不显示打印对话框

转载 作者:太空狗 更新时间:2023-10-29 17:34:29 34 4
gpt4 key购买 nike

我有带有打印工具栏项的自定义控件。当打印控件时Windows 7 中没有对话框,其他系统操作系统中的 64 位操作系统正常工作美好的。仅在 64 位 Windows 7 中存在问题。

我的问题 printdialog 没有出现在 64 位的 Windows 7 操作系统中。

我已经检查并分析了 -->PrintDialog.ShowDialog() 立即返回取消显示问题所在的对话框。

我通过搜索以下链接找到了问题的解决方案:

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

通过将 printdialog 的 UseExDialog 属性设置为 true,对话框出现并且工作正常。但是这个对话框风格就像 windows XP 而不是 windows7 style.so这不是 excat 解决方案。

UseExDialog 属性设置为 true 意味着工作正常。但是打印对话框风格看起来像 Windows XP 打印不像 Windows 7。我需要一些其他的在 64 位 Windows 7 操作系统中显示打印对话框的解决方案。

请提供此问题的完整解决方案

谢谢

湿婆

最佳答案

根据 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.

在我的案例中,第二个已知问题是......我们从 .NET 2.0 升级到 .NET 4.0,并且它在没有任何代码更改(打印)的情况下再次开始工作。

关于c# - printdialog.showdialog();在 64 位 Windows 7 中不显示打印对话框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6385844/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com