Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Custom Print Dialog Question

edited December 2001 in General

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.

Comments

This discussion has been closed.