Page 1 of 1

Print dialog does not display 64 bit Vista

Posted: Wed Mar 25, 2009 1:35 pm
by wjstarck
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

Code: Select all

PrintDialog1.UseEXDialog = true; //needed because PrintDialog was not showing on 64 bit Vista systems
is added to the StartPrint method like so:

Code: 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();
					}
			}
I'm pretty sure it affects every Print button in OD...

Re: Print dialog does not display 64 bit Vista

Posted: Wed Mar 25, 2009 5:00 pm
by jordansparks
That code sample isn't from our code, is it?

Re: Print dialog does not display 64 bit Vista

Posted: Thu Mar 26, 2009 9:35 am
by wjstarck
No.

I didn't think to run the code block inside the #debug as I was on our office pc last night. That code works OK, so maybe MS has taken care of that bug.