Mega Search
23.2 Million


Sign Up

Make a donation  
Delphi 2007 + Vista 64 + TPrinterSetupDialog (and others...)  
News Group: embarcadero.public.delphi.install

My company recently ported our application from D7 to D2007 and when I went to verify that our Quick Reports were working properly in the IDE (they build and run in the application just fine) I found I was getting access viloations when trying to open any Quick Report for editing.

Eventually, working back I found I could not drop a Quick Report component onto a brand new form in a brand new default app without throwing an error. 

More eventually, I figured out my Delphi 2007 installation couldn't use the printer at all.

In this environment (Vista 64-bit), when you pick the 'print' option in Delphi (with a brand new VCL app (no Quick Reports or anything else changed from default)) the message "Printer selected is not valid" appears.  

I created a  very simple test program designed to invoke TPrinterSetupDialog.Execute() and it immediately returns FALSE, but no other exception information.  The TPrintDialog.Execute() throws an exception (Operation not supported on selected printer) when you click 'ok' after selecting a printer, regardless of the printer selected.  I have no other issues printing on this machine from any other app.

Interesting enough,  if I run the same executable (the one built on the Vista box) from a Windows XP or Windows 7 box, the test program executes just fine.  For example, the TPrinterSetupDIalog opens a selection screen as expected and returns TRUE if I click OK.

While searching the Internet, I found many references to problems with the earlier versions of printers.pas, including changes to make to it to facilitate use with Vista, but nothing i have found has helped. I was hoping somebody else might be familiar with this situation and have some suggestions (beyond just moving the porting environment to a different version of Windows.)

Vote for best question.
Score: 0  # Vote:  0
Date Posted: 15-Jan-2015, at 7:40 AM EST
From: Thomas Yanez