Ask a questionAsk a question
 

AnswerPrintDialog Not displaying in 64 bit

  • Wednesday, August 09, 2006 1:26 PMPWStevens Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hello, I have the following code that I'm running without problems on 32 bit, it brings up the print dialog just fine, however on 64 bit it doesn't work, nothing displays; we had the same problem with the crystal viewer and they gave us a hot fix to fix the issue;  do I need to write directly to the windows api or create my own print dialog to get around this?  Is this a known issue, I didn't find anything on it.

    Using frm As New System.Windows.Forms.PrintDialog

    frm.Document = mPrintDocument

    If frm.ShowDialog(Me) = Windows.Forms.DialogResult.Cancel Then

    Return

    End If

    mPrintDocument.Print()

    End Using

    Error handling was removed for clarity... thank you in advance.

    Phil

Answers

  • Wednesday, August 09, 2006 7:11 PMSRIRAM R Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Whats your OS, hardware (AMD?, Intel?)., .Net framework running on your 64-bit machine(am assuming its 2.0)... Did you re-compile against x64 as target ??

    I tried the same code on my x64 and I could reproduce your scenario and the fix worked, once set...

     

All Replies

  • Wednesday, August 09, 2006 6:34 PMSRIRAM R Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Try setting  USEExDialog=True as follows- It should work.,,

    According to MSDN PrintDialog wont work unless its set :

    http://msdn2.microsoft.com/en-us/library/system.windows.forms.printdialog.useexdialog.aspx

     

    Using frm As New System.Windows.Forms.PrintDialog

    frm.Document = mPrintDocument

    frm.UseEXDialog=True  ' TRY THIS

    If frm.ShowDialog(Me) = Windows.Forms.DialogResult.Cancel Then

    Return

    End If

    mPrintDocument.Print()

    End Using

    frm.UseEXDialog=True

     

  • Wednesday, August 09, 2006 7:01 PMPWStevens Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Thank you fro the response, that code did not help; it does the same thing and does not show.
  • Wednesday, August 09, 2006 7:11 PMSRIRAM R Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Whats your OS, hardware (AMD?, Intel?)., .Net framework running on your 64-bit machine(am assuming its 2.0)... Did you re-compile against x64 as target ??

    I tried the same code on my x64 and I could reproduce your scenario and the fix worked, once set...

     

  • Wednesday, August 09, 2006 8:24 PMPWStevens Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Thank you!  You are correct, the problem this time was between the chair and the keyboard; I usually deploy with batch files and this time deployed to a new folder to test on our production server and copied the code from the debug folder instead of release; so I was using an old build... your questions prompted me to relize that.  THANK YOU!

    Phil

  • Tuesday, June 26, 2007 5:59 PMStevefs Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    This article was extremely helpful. I have been pounding my head against the desk for the past 8 hours trying to figure out why I couldn't get the print dialog on the 64 bit machines and dialog would work fine on the 32 bit stations. I searched all over the web (being that I'm not a programmer), and couldn't find anything until now. Thank you.
  • Monday, March 03, 2008 2:15 AMpprajapati Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

     

    Hi,

     

    Could you please tell me from where did you get Crystal Viewer hot fix

     

    Thank you

  • Tuesday, November 03, 2009 10:05 PMJean-François Chatelain Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Thank you very much. That solved my problem.

    Also, for those who will not support 64bits application you can still change you project settings and set the CPU option to x86. I Tried it and it works fine.

    Regards!