> This eis exactly the problem that TPrintSet was designed to overcome,
> unfortunately iy is not being updated beyond D3 version. We need a new
> component :)
Pat what is this TPrintSet thing? I cant find it in D3 help.

With my code below the printer selection is flakey, even though the Caption
shows a required printer. Anything obviously wrong with it?

procedure TCopyform.MPrintersettingsClick(Sender: TObject);
begin
  {if this proc is run, then the printer is set up properly}
  PrinterSetupDialog1.Execute;
  r.WriteInteger('PrintIDX', Printer.PrinterIndex);
  UpDateInfo;
end;

procedure TCopyform.UpDateInfo;
begin
        {if this proc is called from formcreate, then printer is not necessarily
correct}
  try
  {1st time round, this enters the DEFAULT printer into registry, due to
except}
  {each time this is read to see if this app uses a specific printer}
    Printer.PrinterIndex := r.ReadInteger('PrintIDX');
  except
    r.WriteInteger('PrintIDX', Printer.PrinterIndex);
  end;
  {according to Delphi help, accessing the Printers property, sets the
Current printer}
  Caption := Printer.Printers.Strings[Printer.PrinterIndex];
end;

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to