Link to home
Start Free TrialLog in
Avatar of jazzygm
jazzygm

asked on

Getting the Printer Properties dialog.

I want to be able to fiddle with the printers properties, when using the PrintDialog this is accessible from the button marked properties next to the selected printer. I have an Epson printer, and when using the following code I am presented with a form entitled "Epson C42 Properties" but the only tab available is "Version"!

procedure TfrmTimeTable.PrintSettings1Click(Sender: TObject);
var
  APrinter, ADriver, APort: array[0..100] of Char;
  PrinterHandle, DevMode: THandle;
begin
  Printer.GetPrinter(APrinter, ADriver, APort, DevMode);
  OpenPrinter(APrinter, PrinterHandle, nil);
  PrinterProperties(self.Handle, PrinterHandle);
  ClosePrinter(PrinterHandle);
end;

Therefore is there a better way to get this dialog open, which works!?
Also, I have just noticed that on Windows XP there is a new style PrintDialog which is more "graphical" than the older one, anyone know how to make that appear if the OS is XP instead of just the TPrintDialog? If so, can it still be used in the same way? (I'm using delphi 6, unsure if this will have a bearing)
ASKER CERTIFIED SOLUTION
Avatar of PeterLarsen
PeterLarsen

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jazzygm
jazzygm

ASKER

<hangs heads in shame> Ok, should've realised that there is nothing wrong with it, will award points anyway, its only fair!
thanks :-)