PrintDialog.ShowDialog() immediately returns DialogResult.Cancel

  • Thread starter Thread starter John A Grandy
  • Start date Start date
J

John A Grandy

System.Windows.Forms.PrintDialog.ShowDialog()

Has anyone encountered an environment where this call immediately returns
DialogResult.Cancel ?

No print dialog is shown , no exception is thrown , no hang .... bizarre.

This doesn't happen on all our machines , just on a couple of Windows Server
2003 RC2 Enterprise x64 Edition boxes.
 
System.Windows.Forms.PrintDialog.ShowDialog()

Has anyone encountered an environment where this call immediately returns
DialogResult.Cancel ?

No print dialog is shown , no exception is thrown , no hang .... bizarre.

This doesn't happen on all our machines , just on a couple of Windows
Server 2003 RC2 Enterprise x64 Edition boxes.

Just off the top of my head...any chance that these two servers have
absolutely no printers defined?
 
I ran into this as well. I just set UseEXDialog to true working around it.
Not sure what the root cause was...


PrintDialog printDlg = new PrintDialog();
printDlg.Document = doc;
printDlg.UseEXDialog = true;

DialogResult res = printDlg.ShowDialog();
 
Back
Top