Print dialog does not display 64 bit Vista

This forum is for programmers who have questions about the source code.
Post Reply
User avatar
wjstarck
Posts: 936
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Print dialog does not display 64 bit Vista

Post by wjstarck » 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

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...
Cheers,

Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA

User avatar
jordansparks
Site Admin
Posts: 5742
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: Print dialog does not display 64 bit Vista

Post by jordansparks » Wed Mar 25, 2009 5:00 pm

That code sample isn't from our code, is it?
Jordan Sparks, DMD
http://www.opendental.com

User avatar
wjstarck
Posts: 936
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Re: Print dialog does not display 64 bit Vista

Post by wjstarck » Thu Mar 26, 2009 9:35 am

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.
Cheers,

Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA

Post Reply