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
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
The documentation(*) makes brief mention of this needing to be done for AMD64 processors under Remarks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With