为什么PrintDialog类没有显示(64位)? [英] Why is the PrintDialog not displaying (in 64 bit)?

查看:175
本文介绍了为什么PrintDialog类没有显示(64位)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这code,当任何CPU平台建于.Net和一个64位的机器上运行,只是返回取消的的DialogResult没有表现出预期的对话框。

This code, when built in .Net for Any CPU platform and running on a 64-bit machine, simply returns a DialogResult of Cancel without showing the expected dialog box.

Dim dlg As New System.Windows.Forms.PrintDialog

If dlg.ShowDialog() = Windows.Forms.DialogResult.OK Then
    '... print the document '
End If

不过,它工作正常时,该应用程序是专为x86平台,并运行在64位计算机上。你怎么可以用一个64位的显示对话框编译?

However, it works fine when the application is built for the x86 platform, and run on a 64-bit machine. How can you display the dialog with a 64-bit compile?

推荐答案

您需要设置附加属性...

You need to set the additional property...

dlg.UseEXDialog = True

文档(*),使简单提一下这需要对AMD64处理器在备注要做的。

The documentation(*) makes brief mention of this needing to be done for AMD64 processors under Remarks.

  • ms-help://MS.VSCC.v90/MS.MSDNQTR.v90.en/fxref_system.windows.forms/html/43eb054b-8985-16ae-1738-ad9b97a8e8cc.htm

这篇关于为什么PrintDialog类没有显示(64位)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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