printdialog.showdialog();在 64 位 Windows 7 中不显示打印对话框
我有带有打印工具栏项的自定义控件。打印控件时 在其他系统操作系统中运行的 64 位操作系统中,对话框不会出现在 Windows 7 中 美好的。仅在 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风格。所以 这不是精确的解决方案。
UseExDialog 属性设置为 true 意味着工作正常。但是打印对话框 风格看起来像 Windows XP 打印,不像 Windows 7。我需要其他一些 在 64 位 Windows 7 操作系统中显示打印对话框的解决方案。
请提供此问题的完整解决方案
谢谢
Siva
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我的 .net Framework v3.5 遇到了同样的问题,将解决方案升级到 .net Framework v4.5 并且运行良好。
I got the same issue for my .net framework v3.5, upgraded solution to .net framework v4.5 and it worked well.
只需按照以下步骤操作:
1- 在 Visual Studio 2008 中打开旧解决方案(使用 Visual Studio 2005 创建的),
2- 在打开您的解决方案时接受转换(从 2005 年到 2008 年),
3-勾选备份复选框并选择所需的备份位置,
4-您的解决方案成功打开后,您的解决方案,
5、就这样,完成了。现在运行您的项目,您将看到将显示没有任何问题......
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...
将对话框对象属性
AutoUpgradeEnabled
设置为 false 可以纠正在 Windows 7 SP1 64 位中执行时出现的问题(解决方案是使用 VS2008 和 .net 2.0 编译的)。前任。
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.
根据 Microsoft 论坛 :
就我而言,第二个已知问题是...我们从 .NET 2.0 升级到 .NET 4.0,它再次开始工作,而没有任何代码更改(到打印)。
Per Microsoft's Forums:
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).
如果您不能或不喜欢设置
UseEXDialog = true
另一种方法是将您的
Plattform
设置为x86
If you can't or don't like to set
UseEXDialog = true
an alternative would be setting your
Plattform
tox86