Custom Print Dialog Question
I need to write a custom print dialog. As a first step I've written
the code that follows. However, when I attempt to print the report I
get an access error. What am I missing?
Thanks, Craig
unit My_Printer_dlg;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
Dialogs,
StdCtrls, ppforms;
type
TMy_Printer_dlg_frm = class(TppCustomPrintDialog)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
My_Printer_dlg_frm: TMy_Printer_dlg_frm;
implementation
{$R *.DFM}
procedure TMy_Printer_dlg_frm.Button1Click(Sender: TObject);
begin
showmessage ('hello');
end;
initialization
ppRegisterForm(TppCustomPrintDialog, TMy_Printer_dlg_frm);
finalization
ppUnRegisterForm(TppCustomPrintDialog);
end.
This discussion has been closed.
Comments
http://www.digital-metaphors.com/tips/CustomPrintDialog.zip
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com