Problem with removing Print Dialog
Helllo, I was wondering if anyone could help me with this...
I made my own Print Dialog which has a choice of either viewing report,
editing it or printing it directly to the printer.
This is a piece of code I wrote for printing a report directly to the
printer:
if FfrmPrintDialog.cbSetup.Checked then
begin
Device := dvPrinter;
PrinterSetup.PrinterName := 'Current';
PrinterSetup.Copies := FfrmPrintDialog.seCopy.IntValue;
end;
PrintReport;
I encountered a problem at this point- no matter whether I choose Print
Setup or not, the standard Windows Print Dialog form always shows up !
How do I turn it off and use my own settings ?
Thank you in advance, Marina.
I made my own Print Dialog which has a choice of either viewing report,
editing it or printing it directly to the printer.
This is a piece of code I wrote for printing a report directly to the
printer:
if FfrmPrintDialog.cbSetup.Checked then
begin
Device := dvPrinter;
PrinterSetup.PrinterName := 'Current';
PrinterSetup.Copies := FfrmPrintDialog.seCopy.IntValue;
end;
PrintReport;
I encountered a problem at this point- no matter whether I choose Print
Setup or not, the standard Windows Print Dialog form always shows up !
How do I turn it off and use my own settings ?
Thank you in advance, Marina.
This discussion has been closed.
Comments
which is registered by default
uses
ppForms;
...
ppUnRegisterForm(TppCustomPrintDialog);
Then register your new form
ppRegisterForm(TppCustomPrintDialog, TMyPrintDialog);
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com