• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 868
  • Last Modified:

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)
0
jazzygm
Asked:
jazzygm
  • 2
1 Solution
 
PeterLarsenCommented:
Whats wrong with TPrinterSetupDialog ??
0
 
jazzygmAuthor Commented:
<hangs heads in shame> Ok, should've realised that there is nothing wrong with it, will award points anyway, its only fair!
0
 
PeterLarsenCommented:
thanks :-)
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now