2010-05-25 53 views
5

此代碼當內置於任何CPU平臺的.Net並在64位機器上運行時,只需返回Cancel的DialogResult而不顯示預期的對話框。爲什麼PrintDialog不顯示(64位)?

Dim dlg As New System.Windows.Forms.PrintDialog 

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

但是,當應用程序是爲x86平臺而構建的,並且在64位機器上運行時,它工作正常。你如何顯示64位編譯的對話框?

回答

7

您需要設置附加屬性...

dlg.UseEXDialog = True 

文檔(*)使得這個需要下備註AMD64處理器做簡要提及。

  • MS-幫助://MS.VSCC.v90/MS.MSDNQTR.v90.en/fxref_system.windows.forms/html/43eb054b-8985-16ae-1738-ad9b97a8e8cc.htm
+0

感謝您的回答。四歲,仍然幫助某人。 +1 – 2014-01-21 12:23:46