Click here to Skip to main content
15,899,754 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I'm using a 64 Bit Windows 7 system and trying to use PrintDialog. I know it doesn't work on Windows 7 unless you add this code:

PrintDialog1.UseEXDialog = True

So I have added that code but then I get this error for the following code:
VB
Dim result As DialogResult = PrintDialog1.ShowDialog()

And the error:

"An exception of type 'System.Runtime.InteropServices.SEHException' occurred in System.Windows.Forms.dll but was not handled in user code

Additional information: External component has thrown an exception."


Could you please help me fix this issue
Thanks
Posted
Updated 1-Dec-11 14:17pm
v2
Comments
[no name] 1-Dec-11 20:17pm    
EDIT: added "pre" tag
strogg 2-Dec-11 13:45pm    
There seems to be a bug in .net running on win7 64 bit. I found some complaints and responses from microsoft here. http://connect.microsoft.com/VisualStudio/feedback/details/94524/printdialog-useexdialog-causes-unresponsive-ui-when-invoked-from-toolstrip-button
I've also heard that problems with the PrintDialog have been fixed in .Net 4.0 - maybe you can check using famework 4
Samarjeet Singh 10-Feb-13 1:58am    
I am also using a Windows7 64 Bit PC
It works fine with me. What are you trying to print in your application? Textbox/RichTextbox etc

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900