Print dialog does not display 64 bit Vista
Posted: Wed Mar 25, 2009 1:35 pm
FYI, I ran across this while trying to print timecards today from my 64 bit Vista OD box. It's an MS bug, but there is a workaround.
On 64 bit Vista systems, the print dialog box will not display (and thus, no pages will print) unless the following
is added to the StartPrint method like so:
I'm pretty sure it affects every Print button in OD...
On 64 bit Vista systems, the print dialog box will not display (and thus, no pages will print) unless the following
Code: Select all
PrintDialog1.UseEXDialog = true; //needed because PrintDialog was not showing on 64 bit Vista systemsCode: Select all
public void StartPrint(Stream streamToPrint, string streamType){
this.printDocument3.PrintPage += new PrintPageEventHandler(printDocument3_PrintPage);
this.streamToPrint = streamToPrint;
this.streamType = streamType;
System.Windows.Forms.PrintDialog PrintDialog1 = new PrintDialog();
PrintDialog1.AllowSomePages = true;
PrintDialog1.ShowHelp = true;
PrintDialog1.Document = printDocument3;
PrintDialog1.UseEXDialog = true; //needed because PrintDialog was not showing on 64 bit Vista systems
if (PrintDialog1.ShowDialog() == DialogResult.OK)
{
this.printDocument3.Print();
}
}