printdialog.showdialog();没有在 64 位的 Windows 7 中显示打印对话框 [英] printdialog.showdialog(); not showing the print dialog in windows 7 with 64 bit

查看:28
本文介绍了printdialog.showdialog();没有在 64 位的 Windows 7 中显示打印对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有带有打印工具栏项的自定义控件.当打印控件时在其他系统操作系统中使用 64 位操作系统的 Windows 7 中没有出现对话框美好的.仅在 64 位的 Windows 7 中出现问题.

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.

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

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

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

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

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

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 属性设置为 true 意味着工作正常.但是打印对话框样式看起来像 windows XP 打印而不是 windows 7.我需要一些其他的在 64 位 Windows 7 操作系统中显示打印对话框的解决方案.

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

谢谢

湿婆

推荐答案

Per 微软论坛:

来自 Mike Dos Zhang (MSFT CSG)

via Mike Dos Zhang (MSFT CSG)

除非您将 UseEXDialog 属性设置为 true,否则 PrintDialog 类可能无法在 AMD64(x64 或任何 CPU 属于 AMD64 技术,包括英特尔 x64cpu)微处理器上运行.

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.

这是一个已知问题.

而且.net framework4已经支持了这个限制,所以如果你想在windows7风格的对话框中使用这个类,那么你需要使用.net framework4,否则你将需要使用xp风格的对话框并设置UseEXDialog属性为 true,或使用 x86 目标平台.

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,它再次开始工作,无需任何代码更改(到打印).

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

这篇关于printdialog.showdialog();没有在 64 位的 Windows 7 中显示打印对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆